Title: [155039] trunk/Source/WebCore
Revision
155039
Author
[email protected]
Date
2013-09-04 06:44:25 -0700 (Wed, 04 Sep 2013)

Log Message

[GTK] Color of input button's text broken with recent gnome-themes-standard
https://bugs.webkit.org/show_bug.cgi?id=120581

Reviewed by Carlos Garcia Campos.

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStyleContext): add the "text-button" class.
(WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
as this is the one actually used for button labels.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (155038 => 155039)


--- trunk/Source/WebCore/ChangeLog	2013-09-04 13:31:12 UTC (rev 155038)
+++ trunk/Source/WebCore/ChangeLog	2013-09-04 13:44:25 UTC (rev 155039)
@@ -1,3 +1,15 @@
+2013-09-04  Claudio Saavedra  <[email protected]>
+
+        [GTK] Color of input button's text broken with recent gnome-themes-standard
+        https://bugs.webkit.org/show_bug.cgi?id=120581
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/gtk/RenderThemeGtk3.cpp:
+        (WebCore::getStyleContext): add the "text-button" class.
+        (WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
+        as this is the one actually used for button labels.
+
 2013-09-04  Zan Dobersek  <[email protected]>
 
         [GTK] Add support for the Wayland build target

Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp (155038 => 155039)


--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp	2013-09-04 13:31:12 UTC (rev 155038)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp	2013-09-04 13:44:25 UTC (rev 155039)
@@ -90,8 +90,10 @@
         gtk_widget_path_iter_add_class(path, 0, GTK_STYLE_CLASS_ENTRY);
     else if (widgetType == GTK_TYPE_ARROW)
         gtk_widget_path_iter_add_class(path, 0, "arrow");
-    else if (widgetType == GTK_TYPE_BUTTON)
+    else if (widgetType == GTK_TYPE_BUTTON) {
         gtk_widget_path_iter_add_class(path, 0, GTK_STYLE_CLASS_BUTTON);
+        gtk_widget_path_iter_add_class(path, 1, "text-button");
+    }
     else if (widgetType == GTK_TYPE_SCALE)
         gtk_widget_path_iter_add_class(path, 0, GTK_STYLE_CLASS_SCALE);
     else if (widgetType == GTK_TYPE_SEPARATOR)
@@ -988,7 +990,7 @@
 
     switch (cssValueId) {
     case CSSValueButtontext:
-        gtk_style_context_get_color(getStyleContext(GTK_TYPE_BUTTON), static_cast<GtkStateFlags>(0), &gdkRGBAColor);
+        gtk_style_context_get_color(getStyleContext(GTK_TYPE_BUTTON), GTK_STATE_FLAG_ACTIVE, &gdkRGBAColor);
         return gdkRGBAColor;
     case CSSValueCaptiontext:
         gtk_style_context_get_color(getStyleContext(GTK_TYPE_ENTRY), static_cast<GtkStateFlags>(0), &gdkRGBAColor);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to