After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727391 - W32: scrollbar sliders have no "active" and "insensitive" styles
W32: scrollbar sliders have no "active" and "insensitive" styles
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Themes
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-03-31 15:57 UTC by LRN
Modified: 2014-04-04 10:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
W32: give scrollbar slider active and insensitive styles (1.75 KB, patch)
2014-03-31 15:57 UTC, LRN
committed Details | Review
How pressed scrollbar slider looks without the patch (1.07 KB, image/png)
2014-03-31 15:58 UTC, LRN
  Details
How pressed scrollbar slider looks with the patch (1.08 KB, image/png)
2014-03-31 15:59 UTC, LRN
  Details
How disabled scrollbar slider looks without the patch (1.29 KB, image/png)
2014-03-31 16:00 UTC, LRN
  Details
How disabled scrollbar slider looks (or, rather, how it doesn't) with the patch (886 bytes, image/png)
2014-03-31 16:01 UTC, LRN
  Details

Description LRN 2014-03-31 15:57:37 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.
Comment 1 LRN 2014-03-31 15:57:47 UTC
Created attachment 273343 [details] [review]
W32: give scrollbar slider active and insensitive styles
Comment 2 LRN 2014-03-31 15:58:19 UTC
Created attachment 273344 [details]
How pressed scrollbar slider looks without the patch
Comment 3 LRN 2014-03-31 15:59:38 UTC
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.
Comment 4 LRN 2014-03-31 16:00:11 UTC
Created attachment 273346 [details]
How disabled scrollbar slider looks without the patch
Comment 5 LRN 2014-03-31 16:01:17 UTC
Created attachment 273347 [details]
How disabled scrollbar slider looks (or, rather, how it doesn't) with the patch
Comment 6 Ignacio Casal Quinteiro (nacho) 2014-04-01 12:32:50 UTC
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
Comment 7 LRN 2014-04-01 12:52:11 UTC
(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
Comment 8 LRN 2014-04-01 12:54:14 UTC
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 9 Ignacio Casal Quinteiro (nacho) 2014-04-04 10:31:36 UTC
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.
Comment 10 LRN 2014-04-04 10:33:59 UTC
Attachment 273343 [details] pushed as 3a806b9 - W32: give scrollbar slider active and insensitive styles