]> Pileus Git - ~andy/gtk/commit
range: allow stepper-spacing > 0 and trough-under-steppers = TRUE
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 14 Mar 2011 22:21:47 +0000 (18:21 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 16 Mar 2011 17:20:07 +0000 (13:20 -0400)
commit9205abe37420d7338cb9c7aacf2b7b9941896d72
treea74b043bca1da5aab843d0c88ac67e6d70ab150b
parent66a77d0bc0cadcf14faeb3d6a5da3a78ae1ab6d1
range: allow stepper-spacing > 0 and trough-under-steppers = TRUE

Commit 4bb3d6441439e4d99255a3a08b39da7100ced953 introduced a limitation
to GtkRange style properties; when stepper-spacing is > 0,
trough-under-steppers is automatically set to FALSE; this means that
setting a spacing between the steppers (e.g. the scrollbar buttons) and
the trough (i.e. the area over which the slider is free to move) would
make the buttons always get the full allocation on the !orientation
direction.
The rationale is without this limitation, you would get an area which
seems clickable, but it's actually not.

While this is true, and undesirable, for big stepper spacings, themes
that use trough-under-steppers (which is TRUE by default anyway),
might want to set smaller spacings to avoid drawing a double line between
the button and the slider borders.

To add confusion, the documentation got it flipped, i.e. it stated
setting a positive stepper-spacing would set trough-under-steppers to
TRUE (which would also make the behavior expected by commit
4bb3d6441439e4d99255a3a08b39da7100ced953 impossible).

I don't think hardcoding either of the two limitations is a good thing.
We should let themes handle this instead, and remove this limitation. If
you want the old behavior, you can manually set trough-under-steppers to
FALSE if you set a positive stepper-spacing in your theme.

https://bugzilla.gnome.org/show_bug.cgi?id=644777
gtk/gtkrange.c