GNOME Bugzilla – Bug 727022
W32: Both inc- and dec-buttons on GtkSpinbutton are "inc"
Last modified: 2014-04-04 10:01:46 UTC
This seems to be because "dec" button no longer selects as "bottom".
Created attachment 272860 [details] [review] Fix W32 theme for spinbuttons It seems that the dec-button no longer has a "bottom" selector-thingy to select for. Use "last-child" instead.
Created attachment 272861 [details] How it looks without the patch
Created attachment 272862 [details] How it looks with the patch
Review of attachment 272860 [details] [review]: in principle it looks good, but I wonder if you tested with right-to-left locales, and see if it still matches, or we need to add a `dir(rtl)` selector.
Ah, actually, it doesn't work. It works for horizontally-oriented spinbuttons, but buttons meaning is reversed for vertically-oriented ones. And i haven't got a clue about RTL.
Created attachment 272864 [details] [review] Fix W32 theme for spinbuttons (v2) It seems that the dec-button no longer has a "bottom" selector-thingy to select for. Use "last-child" instead. Use .vertical to style vertical instance differently, as last-child/first-child meaning is inverted there. Increase (towards 0) margins a bit, to avoid clipping the pre-light rectangle.
Yep, it doesn't work with RTL. Actually, vertical ones, which i've just fixed up, do work with RTL, since RTL doesn't change anything for them - "inc" is always first-child, "dec" is always last-child, entry is in the middle. for horizontal ones, "last-child" is, apparently, the entry, so both buttons are styled as "dec".
Created attachment 272865 [details] [review] Fix W32 theme for spinbuttons (v3) It seems that the dec-button no longer has a "bottom" selector-thingy to select for. Use "last-child" instead. Use .vertical to style vertical instance differently, as last-child/first-child meaning is inverted there. Increase (towards 0) margins a bit, to avoid clipping the pre-light rectangle. Use dir(rtl) selector to style horizontal instance differently for RTL locales, where first-child is "inc".
Attachment 272865 [details] pushed as ce9437d - Fix W32 theme for spinbuttons