jpfleury / clearlooks-phenix

GTK3 port of the Clearlooks theme
GNU General Public License v3.0
96 stars 42 forks source link

Scrollbar borders don't collapse when the thumb is at the end of a slider #5

Closed andrewshadura closed 9 years ago

andrewshadura commented 9 years ago

Currently, scrollbars are drawn as on this picture: 2014-09-30-103927_52x76_scrot 2014-09-30-104037_371x519_scrot When fixing the code up to GTK+ 3.14 changes, I notices that in this situation the bottom border of a stepped is being hidden, so I disabled that code (it now looks less ugly anyway). However, I think that this should look like this, but I can't come up with a CSS code that'd do this: 2014-09-30-103927_52x76_scrot_2 2014-09-30-104321_320x467_scrot As you can see, here, the top border of a thumb is hidden by a bottom border of a stepper. I've got no idea how to implement this, unfortunately, but this issue is worth documenting here anyway.

P.S. For the comparison, here's a scrollbar from GTK+ 2 version: 2014-09-30-104825_182x358_scrot

jpfleury commented 9 years ago

I remember that for previous versions of Clearlooks-Phénix, I didn't success to find a way to mimic exactly GTK2 for this specific case. I don't think it's possible because we need something like:

if .scrollbar.button.top:insensitive; then
    .scrollbar.slider.vertical {
        border-top: none;
    }
fi

That's why I removed the border on the scrollbar button. Personally, I think that the workaround from the branch bug-5 is better than the actual look.

andrewshadura commented 9 years ago

You really think so? My opinion is that not doing anything is better than enlarging stepper buttons (and that's how it looks like)

jpfleury commented 9 years ago

Yes, I think so, but maybe it's just because I'm used to seeing it this way with all previous versions. :-)

jpfleury commented 9 years ago

I'll leave it as it is now. If we want to get back to the old style, the diff is:

diff --git a/gtk-3.0/gtk-widgets.css b/gtk-3.0/gtk-widgets.css
index ec823ec..d343c8a 100644
--- a/gtk-3.0/gtk-widgets.css
+++ b/gtk-3.0/gtk-widgets.css
@@ -1085,6 +1085,22 @@ GtkComboBox .button *:hover {
    color: @scrollbar_button_insensitive_color;
 }

+.scrollbar.button.top:insensitive {
+   border-bottom: none;
+}
+
+.scrollbar.button.right:insensitive {
+   border-left: none;
+}
+
+.scrollbar.button.bottom:insensitive {
+   border-top: none;
+}
+
+.scrollbar.button.left:insensitive {
+   border-right: none;
+}
+
 .scrollbar.slider {
    background-color: @scrollbar_slider_bg_color;
    background-image: none;
jpfleury commented 9 years ago

If you find a way to get the style of GTK2, feel free to reopen the report.