From b677ede6bc013a0ff0b5712a1631cedcf6d70878 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Wed, 12 Mar 2008 15:56:14 +0000 Subject: [PATCH] Back out patch from Julien Rivaud in bug 416868 due to reftest failure. git-svn-id: svn://10.0.0.236/trunk@247640 18797224-902f-48f8-a5cc-f745e15eee43 --- .../themes/gnomestripe/global/button.css | 7 ++++++- .../themes/gnomestripe/global/dropmarker.css | 3 --- .../toolkit/themes/gnomestripe/global/jar.mn | 1 - .../gnomestripe/global/toolbarbutton.css | 11 ++++++++++- mozilla/widget/src/gtk2/gtk2drawing.c | 19 ++++--------------- mozilla/widget/src/gtk2/gtkdrawing.h | 9 --------- mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp | 7 +------ 7 files changed, 21 insertions(+), 36 deletions(-) delete mode 100644 mozilla/toolkit/themes/gnomestripe/global/dropmarker.css diff --git a/mozilla/toolkit/themes/gnomestripe/global/button.css b/mozilla/toolkit/themes/gnomestripe/global/button.css index 9182488a9dd..5a4fd1fa84c 100644 --- a/mozilla/toolkit/themes/gnomestripe/global/button.css +++ b/mozilla/toolkit/themes/gnomestripe/global/button.css @@ -154,7 +154,12 @@ button[type="menu-button"] { .button-menu-dropmarker, .button-menubutton-dropmarker { - -moz-appearance: toolbarbutton-dropdown !important; + -moz-appearance: none !important; + margin: 1px; + background-color: transparent !important; + border: none !important; + min-width:11px; + min-height:11px; } .button-menubutton-dropmarker[open="true"] { diff --git a/mozilla/toolkit/themes/gnomestripe/global/dropmarker.css b/mozilla/toolkit/themes/gnomestripe/global/dropmarker.css deleted file mode 100644 index 061334ae19f..00000000000 --- a/mozilla/toolkit/themes/gnomestripe/global/dropmarker.css +++ /dev/null @@ -1,3 +0,0 @@ -dropmarker { - -moz-appearance: menulist-button; -} diff --git a/mozilla/toolkit/themes/gnomestripe/global/jar.mn b/mozilla/toolkit/themes/gnomestripe/global/jar.mn index 7cb38c67ce5..17e88768954 100644 --- a/mozilla/toolkit/themes/gnomestripe/global/jar.mn +++ b/mozilla/toolkit/themes/gnomestripe/global/jar.mn @@ -7,7 +7,6 @@ classic.jar: + skin/classic/global/tabbox.css + skin/classic/global/toolbar.css + skin/classic/global/toolbarbutton.css -+ skin/classic/global/dropmarker.css + skin/classic/global/button.css + skin/classic/global/checkbox.css + skin/classic/global/splitter.css diff --git a/mozilla/toolkit/themes/gnomestripe/global/toolbarbutton.css b/mozilla/toolkit/themes/gnomestripe/global/toolbarbutton.css index 1146d3700fc..70c22510b95 100644 --- a/mozilla/toolkit/themes/gnomestripe/global/toolbarbutton.css +++ b/mozilla/toolkit/themes/gnomestripe/global/toolbarbutton.css @@ -116,10 +116,12 @@ toolbarbutton[checked="true"]:hover:active { .toolbarbutton-menu-dropmarker { -moz-appearance: toolbarbutton-dropdown !important; list-style-image: none; + width: 13px; + height: 13px; border: none !important; background-color: transparent !important; padding: 0; - margin: 0; + margin: 2px; } .toolbarbutton-menu-dropmarker[disabled="true"] { @@ -159,4 +161,11 @@ toolbarbutton[type="menu-button"][disabled="true"]:hover:active { padding: 3px; -moz-appearance: toolbarbutton-dropdown !important; list-style-image: none; + width: 12px; + height: 12px; } + +.toolbarbutton-menubutton-dropmarker[disabled="true"] { + padding: 3px !important; +} + diff --git a/mozilla/widget/src/gtk2/gtk2drawing.c b/mozilla/widget/src/gtk2/gtk2drawing.c index 0a2757477f8..8375bfbe0ac 100644 --- a/mozilla/widget/src/gtk2/gtk2drawing.c +++ b/mozilla/widget/src/gtk2/gtk2drawing.c @@ -1638,8 +1638,10 @@ moz_gtk_downarrow_paint(GdkDrawable* drawable, GdkRectangle* rect, ensure_button_arrow_widget(); style = gButtonArrowWidget->style; - calculate_arrow_rect(gButtonArrowWidget, rect, &arrow_rect, - GTK_TEXT_DIR_LTR); + arrow_rect.x = rect->x + 1 + XTHICKNESS(style); + arrow_rect.y = rect->y + 1 + YTHICKNESS(style); + arrow_rect.width = MAX(1, rect->width - (arrow_rect.x - rect->x) * 2); + arrow_rect.height = MAX(1, rect->height - (arrow_rect.y - rect->y) * 2); TSOffsetStyleGCs(style, arrow_rect.x, arrow_rect.y); gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect, @@ -2699,19 +2701,6 @@ moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height) return MOZ_GTK_SUCCESS; } -gint -moz_gtk_get_downarrow_size(gint* width, gint* height) -{ - GtkRequisition requisition; - ensure_button_arrow_widget(); - - gtk_widget_size_request(gButtonArrowWidget, &requisition); - *width = requisition.width; - *height = requisition.height; - - return MOZ_GTK_SUCCESS; -} - gint moz_gtk_get_toolbar_separator_width(gint* size) { diff --git a/mozilla/widget/src/gtk2/gtkdrawing.h b/mozilla/widget/src/gtk2/gtkdrawing.h index 4c9d89c4c8b..71c3437ce7e 100644 --- a/mozilla/widget/src/gtk2/gtkdrawing.h +++ b/mozilla/widget/src/gtk2/gtkdrawing.h @@ -352,15 +352,6 @@ gint moz_gtk_get_combo_box_entry_button_size(gint* width, gint* height); */ gint moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height); -/** - * Get the desired size of a toolbar button dropdown arrow - * width: [OUT] the desired width - * height: [OUT] the desired height - * - * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise - */ -gint moz_gtk_get_downarrow_size(gint* width, gint* height); - /** * Get the desired size of a toolbar separator * size: [OUT] the desired width diff --git a/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp b/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp index 4e69efa2d15..f9663d2d8c3 100644 --- a/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp +++ b/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp @@ -1116,12 +1116,7 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsIRenderingContext* aContext, *aIsOverridable = PR_FALSE; } break; - case NS_THEME_TOOLBAR_BUTTON_DROPDOWN: - { - moz_gtk_get_downarrow_size(&aResult->width, &aResult->height); - *aIsOverridable = PR_FALSE; - } - break; + case NS_THEME_CHECKBOX_CONTAINER: case NS_THEME_RADIO_CONTAINER: case NS_THEME_CHECKBOX_LABEL: