summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Penners <pennersr@src.gnome.org>2003-10-18 20:37:30 +0000
committerRaymond Penners <pennersr@src.gnome.org>2003-10-18 20:37:30 +0000
commit52349beb922e1c37d9d20cddb5998d444fe27e7f (patch)
treee2ae60dc4ca780b8938747aca5e50923bb38dcb6
parentb49a5ec5b4a4149431eac0147fe5acc810b1128b (diff)
downloadgdk-pixbuf-52349beb922e1c37d9d20cddb5998d444fe27e7f.tar.gz
Grippers
-rwxr-xr-xmodules/engines/ms-windows/ChangeLog.old5
-rwxr-xr-xmodules/engines/ms-windows/wimp_style.c6
-rwxr-xr-xmodules/engines/ms-windows/xp_theme.c18
3 files changed, 26 insertions, 3 deletions
diff --git a/modules/engines/ms-windows/ChangeLog.old b/modules/engines/ms-windows/ChangeLog.old
index 5fb487e56..4c24ffe15 100755
--- a/modules/engines/ms-windows/ChangeLog.old
+++ b/modules/engines/ms-windows/ChangeLog.old
@@ -1,3 +1,8 @@
+2003-10-18 Raymond Penners <raymond@dotsphinx.com>
+
+ * src/*: Attempted to fix the grippers for the GNAT Programming
+ System. Things behave a tiny bit better now. See #ifdef GNATS_HACK
+
2003-10-17 Raymond Penners <raymond@dotsphinx.com>
* src/wimp_style.c: Horizontal/vertical scrollbars were mixed up,
diff --git a/modules/engines/ms-windows/wimp_style.c b/modules/engines/ms-windows/wimp_style.c
index 57f39cbca..74b8434b0 100755
--- a/modules/engines/ms-windows/wimp_style.c
+++ b/modules/engines/ms-windows/wimp_style.c
@@ -1508,10 +1508,12 @@ draw_handle (GtkStyle *style,
gint height,
GtkOrientation orientation)
{
- XpThemeElement hndl;
-
if (!GTK_IS_HANDLE_BOX (widget))
{
+ XpThemeElement hndl;
+
+ sanitize_size (window, &width, &height);
+
if (orientation == GTK_ORIENTATION_VERTICAL)
hndl = XP_THEME_ELEMENT_GRIPPER_V;
else
diff --git a/modules/engines/ms-windows/xp_theme.c b/modules/engines/ms-windows/xp_theme.c
index 24239c7f7..6e2acffda 100755
--- a/modules/engines/ms-windows/xp_theme.c
+++ b/modules/engines/ms-windows/xp_theme.c
@@ -303,7 +303,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
case XP_THEME_ELEMENT_REBAR:
case XP_THEME_ELEMENT_GRIPPER_H:
case XP_THEME_ELEMENT_GRIPPER_V:
- ret = 0;
+ ret = CHEVS_NORMAL;
break;
case XP_THEME_ELEMENT_CHEVRON:
@@ -661,6 +661,22 @@ xp_theme_draw (GdkWindow *win, XpThemeElement element, GtkStyle *style,
return FALSE;
part_state = xp_theme_map_gtk_state(element, state_type);
+
+#ifdef GNATS_HACK
+ if (element == XP_THEME_ELEMENT_GRIPPER_V
+ || element == XP_THEME_ELEMENT_GRIPPER_H)
+ {
+ /* Hack alert: when XP draws a gripper, it does not seem to fill
+ up the whole rectangle. It only fills the gripper line
+ itself. Therefore we manually fill up the background here
+ ourselves. I still have to look into this a bit further, as
+ tests with GNAT Programming System show some awkward
+ interference between this FillRect and the subsequent
+ DrawThemeBackground(). */
+ FillRect (dc, &rect, (HBRUSH) (COLOR_3DFACE+1));
+ }
+#endif
+
draw_theme_background_func(theme, dc, element_part_map[element], part_state, &rect, pClip);
gdk_win32_hdc_release(drawable, style->dark_gc[state_type], 0);