mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Tree expanders fixed
This commit is contained in:
parent
c77b0caab1
commit
0815d43bce
@ -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>
|
||||
|
||||
|
@ -9,6 +9,7 @@ style "wimp-default"
|
||||
GtkSpinButton::shadow-type = in
|
||||
|
||||
GtkTreeView::allow-rules = 0
|
||||
GtkTreeView::expander_size = 11
|
||||
|
||||
engine "wimp"
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user