r4370 - in trunk/src/target/OM-2007.2/libraries/moko-gtk-engine: . src
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Wed Apr 16 17:40:58 CEST 2008
Author: thomas
Date: 2008-04-16 17:40:55 +0200 (Wed, 16 Apr 2008)
New Revision: 4370
Modified:
trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog
trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c
Log:
2008-04-16 Thomas Wood <thomas at openedhand.com>
* src/moko-draw.c: (moko_draw_box): Update remove prelight hack
Modified: trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog 2008-04-16 14:45:08 UTC (rev 4369)
+++ trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog 2008-04-16 15:40:55 UTC (rev 4370)
@@ -1,5 +1,9 @@
2008-04-16 Thomas Wood <thomas at openedhand.com>
+ * src/moko-draw.c: (moko_draw_box): Update remove prelight hack
+
+2008-04-16 Thomas Wood <thomas at openedhand.com>
+
* data/gtk-2.0/gtkrc: Fix labels font colour on inactive tabs
2008-04-16 Thomas Wood <thomas at openedhand.com>
Modified: trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c 2008-04-16 14:45:08 UTC (rev 4369)
+++ trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c 2008-04-16 15:40:55 UTC (rev 4370)
@@ -54,13 +54,30 @@
x -= 10;
}
- /* "fix" for prelight active toggle buttons */
- if (DETAIL ("button") && state_type == GTK_STATE_PRELIGHT && shadow_type == GTK_SHADOW_IN)
+ /* hack to remove prelight */
+ if (state_type == GTK_STATE_PRELIGHT
+ && !DETAIL ("menuitem") && !DETAIL ("bar"))
{
- state_type = GTK_STATE_ACTIVE;
+ if (widget && GTK_IS_TOGGLE_BUTTON (widget)
+ && shadow_type == GTK_SHADOW_IN)
+ {
+ state_type = GTK_STATE_ACTIVE;
+ }
+ else
+ {
+ if (widget && GTK_IS_BUTTON (widget)
+ && (gtk_button_get_relief (GTK_BUTTON (widget)) == GTK_RELIEF_NONE))
+ {
+ /* none relief buttons shouldn't draw anything for "normal" state */
+ return;
+ }
+ else
+ {
+ state_type = GTK_STATE_NORMAL;
+ }
+ }
}
-
if (DETAIL ("trough"))
gc = style->base_gc[state_type];
else if (DETAIL ("bar"))
More information about the commitlog
mailing list