Bug 423599 - "Misaligned navigation panel on computerworld.com due to tall combobox" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=vlad a=blocking1.9+]
authorreed@reedloden.com
Wed, 19 Mar 2008 23:08:09 -0700
changeset 13369 377747bc97d46cdce6e325747570eea1783c94e4
parent 13368 944d3a3993046dfd940e6e37308beda84ba15c71
child 13370 655e0d6778cef6b33b6ed686be6de69dd9e69c75
push idunknown
push userunknown
push dateunknown
reviewersblocking1.9
bugs423599
milestone1.9b5pre
Bug 423599 - "Misaligned navigation panel on computerworld.com due to tall combobox" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=vlad a=blocking1.9+]
widget/src/gtk2/gtk2drawing.c
--- a/widget/src/gtk2/gtk2drawing.c
+++ b/widget/src/gtk2/gtk2drawing.c
@@ -985,23 +985,23 @@ calculate_button_inner_rect(GtkWidget* b
 
     style = button->style;
 
     /* This mirrors gtkbutton's child positioning */
     moz_gtk_button_get_inner_border(button, &inner_border);
     moz_gtk_widget_get_focus(button, &interior_focus,
                              &focus_width, &focus_pad);
 
-    inner_rect->x = rect->x + XTHICKNESS(style) + focus_width + focus_pad;
+    inner_rect->x = rect->x + XTHICKNESS(style);
     inner_rect->x += direction == GTK_TEXT_DIR_LTR ?
                         inner_border.left : inner_border.right;
     inner_rect->y = rect->y + inner_border.top + YTHICKNESS(style) +
                     focus_width + focus_pad;
     inner_rect->width = MAX(1, rect->width - inner_border.left -
-       inner_border.right - (XTHICKNESS(style) + focus_pad + focus_width) * 2);
+       inner_border.right - XTHICKNESS(style) * 2);
     inner_rect->height = MAX(1, rect->height - inner_border.top -
        inner_border.bottom - (YTHICKNESS(style) + focus_pad + focus_width) * 2);
 
     return MOZ_GTK_SUCCESS;
 }
 
 
 static gint
@@ -2584,31 +2584,24 @@ moz_gtk_get_widget_border(GtkThemeWidget
         ensure_combo_box_entry_widgets();
         w = gComboBoxEntryButtonWidget;
         break;
     case MOZ_GTK_DROPDOWN:
         {
             /* We need to account for the arrow on the dropdown, so text
              * doesn't come too close to the arrow, or in some cases spill
              * into the arrow. */
-            gboolean ignored_interior_focus, wide_separators;
-            gint focus_width, focus_pad, separator_width;
+            gboolean wide_separators;
+            gint separator_width;
             GtkRequisition arrow_req;
 
             ensure_combo_box_widgets();
 
-            moz_gtk_widget_get_focus(gComboBoxButtonWidget,
-                                     &ignored_interior_focus,
-                                     &focus_width, &focus_pad);
-            *left = *top = focus_width + focus_pad +
-                           GTK_CONTAINER(gComboBoxButtonWidget)->border_width;
-            *left += gComboBoxButtonWidget->style->xthickness;
-            *top += gComboBoxButtonWidget->style->ythickness;
-
-            *right = *left; *bottom = *top;
+            *left = *right = gComboBoxButtonWidget->style->xthickness;
+            *top = *bottom = gComboBoxButtonWidget->style->ythickness;
 
             /* If there is no separator, don't try to count its width. */
             separator_width = 0;
             if (gComboBoxSeparatorWidget) {
                 gtk_widget_style_get(gComboBoxSeparatorWidget,
                                      "wide-separators", &wide_separators,
                                      "separator-width", &separator_width,
                                      NULL);