Tree expanders fixed

This commit is contained in:
Raymond Penners 2003-09-15 20:52:37 +00:00
parent c77b0caab1
commit 0815d43bce
3 changed files with 16 additions and 9 deletions

View File

@ -2,7 +2,9 @@
* src/wimp_style.c: Fixed typ-o (gtk-double-cliNk-time), adjusted
cursor blink time to cope with Windows semantics (GTK+ uses cycle
time), fixed clipping area computation.
time), fixed clipping area computation. Fixed XP tree expanders to
cope with clipping area, and made non-XP tree expanders look
pixel-perfect.
2003-09-15 Dom Lachowicz <cinamod@hotmail.com>

View File

@ -9,6 +9,7 @@ style "wimp-default"
GtkSpinButton::shadow-type = in
GtkTreeView::allow-rules = 0
GtkTreeView::expander_size = 11
engine "wimp"
{

View File

@ -644,16 +644,12 @@ draw_expander(GtkStyle *style,
break;
}
if (xp_theme_draw(window, xp_expander, style,
x, y - expander_size / 2,
expander_size, expander_size, state, area))
{
return;
}
if ((expander_size % 2) == 0)
expander_size--;
if (expander_size > 2)
expander_size -= 2;
if (area)
gdk_gc_set_clip_rectangle (style->fg_gc[state], area);
@ -663,6 +659,13 @@ draw_expander(GtkStyle *style,
gdk_gc_get_values (style->fg_gc[state], &values);
if (xp_theme_draw(window, xp_expander, style,
x, y,
expander_size, expander_size, state, area))
{
return;
}
/* RGB values to emulate Windows Classic style */
color.red = color.green = color.blue = 128 << 8;
@ -673,7 +676,8 @@ draw_expander(GtkStyle *style,
gdk_gc_set_foreground (style->fg_gc[state], &color);
gdk_draw_rectangle
(window, style->fg_gc[state], FALSE, x, y, expander_size, expander_size);
(window, style->fg_gc[state], FALSE, x, y,
expander_size - 1, expander_size - 1);
if (success)
gdk_gc_set_foreground (style->fg_gc[state], &values.foreground);