Title: [110762] trunk/Source/WebCore
- Revision
- 110762
- Author
- [email protected]
- Date
- 2012-03-14 15:04:50 -0700 (Wed, 14 Mar 2012)
Log Message
[GTK] Menulist buttons have separators even when the theme turns them off
https://bugs.webkit.org/show_bug.cgi?id=80668
Reviewed by Daniel Bates.
No new tests. GTK+ theme differences are notoriously difficult
to test, because consistent results depend on having certain themes
and certain versions of themes installed.
Instead of using the GTK_TYPE_BUTTON and GTK_TYPE_SEPARATOR tags to get the
style context, use GTK_TYPE_COMBO_BOX which should provide more accurate theme settings.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getComboBoxMetrics): Get metrics from a GTK_TYPE_COMBO_BOX style context.
(WebCore::RenderThemeGtk::paintMenuList): Get separator settings from the GTK_TYPE_COMBO_BOX style context.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (110761 => 110762)
--- trunk/Source/WebCore/ChangeLog 2012-03-14 22:02:00 UTC (rev 110761)
+++ trunk/Source/WebCore/ChangeLog 2012-03-14 22:04:50 UTC (rev 110762)
@@ -1,3 +1,21 @@
+2012-03-12 Martin Robinson <[email protected]>
+
+ [GTK] Menulist buttons have separators even when the theme turns them off
+ https://bugs.webkit.org/show_bug.cgi?id=80668
+
+ Reviewed by Daniel Bates.
+
+ No new tests. GTK+ theme differences are notoriously difficult
+ to test, because consistent results depend on having certain themes
+ and certain versions of themes installed.
+
+ Instead of using the GTK_TYPE_BUTTON and GTK_TYPE_SEPARATOR tags to get the
+ style context, use GTK_TYPE_COMBO_BOX which should provide more accurate theme settings.
+
+ * platform/gtk/RenderThemeGtk3.cpp:
+ (WebCore::getComboBoxMetrics): Get metrics from a GTK_TYPE_COMBO_BOX style context.
+ (WebCore::RenderThemeGtk::paintMenuList): Get separator settings from the GTK_TYPE_COMBO_BOX style context.
+
2012-03-14 Levi Weintraub <[email protected]>
Implement proper sub-pixel support in RenderFileUploadControl
Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp (110761 => 110762)
--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp 2012-03-14 22:02:00 UTC (rev 110761)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp 2012-03-14 22:04:50 UTC (rev 110762)
@@ -366,7 +366,7 @@
if (style->appearance() == NoControlPart)
return;
- GtkStyleContext* context = getStyleContext(GTK_TYPE_BUTTON);
+ GtkStyleContext* context = getStyleContext(GTK_TYPE_COMBO_BOX);
gtk_style_context_save(context);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON);
@@ -522,12 +522,11 @@
gtk_style_context_restore(arrowStyleContext);
// Paint the separator if needed.
- GtkStyleContext* separatorStyleContext = getStyleContext(GTK_TYPE_SEPARATOR);
+ GtkStyleContext* separatorStyleContext = getStyleContext(GTK_TYPE_COMBO_BOX);
gtk_style_context_save(separatorStyleContext);
gtk_style_context_set_direction(separatorStyleContext, direction);
gtk_style_context_add_class(separatorStyleContext, "separator");
- gtk_style_context_add_class(separatorStyleContext, GTK_STYLE_CLASS_BUTTON);
gboolean wideSeparators;
gint separatorWidth;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes