GNOME Bugzilla – Bug 727391
W32: scrollbar sliders have no "active" and "insensitive" styles
Last modified: 2014-04-04 10:34:41 UTC
Adwaita doesn't seem to be using those, but on W32 scrollbar slider does look different while you keep it pressed. Insensitive scrollbars are rare, the only example that i've found is Windows Notepad.
Created attachment 273343 [details] [review] W32: give scrollbar slider active and insensitive styles
Created attachment 273344 [details] How pressed scrollbar slider looks without the patch
Created attachment 273345 [details] How pressed scrollbar slider looks with the patch Not much of a difference, obviously. It looks a bit more different on XP though.
Created attachment 273346 [details] How disabled scrollbar slider looks without the patch
Created attachment 273347 [details] How disabled scrollbar slider looks (or, rather, how it doesn't) with the patch
Review of attachment 273343 [details] [review]: See the comments. ::: gtk/resources/theme/gtk-win32-base.css @@ +356,3 @@ +} + +.scrollbar.slider:insensitive { Not sure I like that, if there is a part for it I'd use it, then the application can decide to hide it if it doesn't want to show it. @@ +376,3 @@ +} + +.scrollbar.slider.vertical:insensitive { ditto
(In reply to comment #6) > Review of attachment 273343 [details] [review]: > > See the comments. > > ::: gtk/resources/theme/gtk-win32-base.css > @@ +356,3 @@ > +} > + > +.scrollbar.slider:insensitive { > > Not sure I like that, if there is a part for it I'd use it, then the > application can decide to hide it if it doesn't want to show it. > > @@ +376,3 @@ > +} > + > +.scrollbar.slider.vertical:insensitive { > > ditto Let me clarify. There are three separate issues with insensitive scrollbars: 1) In situations where scrollbars should naturally become insensitive, they disappear instead. This is the default policy, and this is why insensitive scrollbars are rare. This is true for GTK, and this is true for native W32 2) If policy is overridden, scrollbars don't disappear. GTK, however, does not make a scrollbar insensitive, even in this case, where it there's nowhere to scroll. Scrollbar remains sensitive, it reacts to prelight, but slider can't move anywhere. This is GTK-only problem, presumably. I don't know whether W32 makes scrollbars insensitive in this situation or not (due to (1) it's difficult to find in the wild (i only found one app that does this - Notepad), and i don't feel like doing W32API test program just to check). 3) When a scrollbar IS made insensitive, W32 draws it without a slider, even though there's a theme part for a disabled scrollbar slider. Again, due to (1) it's difficult to generalize this. So i am not arguing that we should override scrollbar-hiding policy. This was, and is up to application. I am arguing that we should do what MS does and not draw slider on disabled (insensitive) scrollbars. This wouldn't be the first time. The bug #727244 has this property as well (listbox selection is drawn with some kind of theme part that is not, in fact, part of a listbox). I googled a bit more, and found these: W7, disabled scrollbar has no slider: http://vbcity.com/blogs/canoz/archive/2010/04/13/beginning-silverlight-layout-part-2.aspx Classic theme, disabled scrollbar has no slider: https://stackoverflow.com/questions/7855201/how-do-you-display-a-vertical-scrollbar-on-the-net-webbrowser-control-only-when XP, IE, disabled scrollbar has no slider: http://www.webdevelopersnotes.com/tips/html/transparent_hidden_scrollbar_code.php3
To be clear, i'm also not arguing that GTK should make scrollbar insensitive when there's nothing to scroll. An optional policy or a tweak enabling such behaviour - maybe (as long as i'm not the one coding it!). Mandatory - no, absolutely not.
Comment on attachment 273343 [details] [review] W32: give scrollbar slider active and insensitive styles After the new information I think we can safely push this.
Attachment 273343 [details] pushed as 3a806b9 - W32: give scrollbar slider active and insensitive styles