(SOLVED) Re: scroll bar question- addtional help please

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Howard_P
Level 3
Level 3
Posts: 122
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

(SOLVED) Re: scroll bar question- addtional help please

Post by Howard_P » Thu Oct 04, 2018 11:07 am

When I upgraded from 17.3 XFCE to 19 Mate the size of the scroll bar on the right side of the screen became very narrow. This is true in Firefox and Thunderbird, but not so much in Chromium. Is there a way to expand the size of that bar? Thanks. -Howard
Last edited by Howard_P on Mon Oct 08, 2018 11:59 am, edited 4 times in total.

User avatar
N3wb
Level 2
Level 2
Posts: 76
Joined: Mon Sep 17, 2018 11:33 am

Re: scroll bar question

Post by N3wb » Thu Oct 04, 2018 1:23 pm

Enabling scrollbar arrows: https://www.linuxquestions.org/question ... 175580868/

Change look of scrollbar by manipulating CSS file of your current theme (by default would be in /usr/share/themes/<theme_name>). Make sure to backup the original file before making any changes.
Linux Mint 19 Cinnamon
Kernel: 4.15.0-36-generic

gm10
Level 17
Level 17
Posts: 7410
Joined: Thu Jun 21, 2018 5:11 pm

Re: scroll bar question

Post by gm10 » Thu Oct 04, 2018 1:57 pm

^ correct but probably not all that helpful.

Here's what you do - say you're using the Mint-Y-Dark theme:

Code: Select all

xed admin:///usr/share/themes/Mint-Y-Dark/gtk-3.0/gtk.css
Search for scrollbar slider. You'll find this:

Code: Select all

  scrollbar slider {
    min-width: 6px;
Now change the width to whatever you want. Save and change your theme back and forth so it gets reloaded, done. Works similarly with other themes.

Howard_P
Level 3
Level 3
Posts: 122
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: scroll bar question- addtional help please

Post by Howard_P » Mon Oct 08, 2018 11:24 am

The above instructions worked as described, however when I tried it with the theme Mint-X-Blue using this, I got the following return
howard@howard-ThinkPad-T440s:~$ xed admin:///usr/share/themes/Mint-X-Blue/gtk-3.0/gtk.css

** (xed:2469): WARNING **: 08:20:12.100: The specified location is not mounted
and, in the next screen instead items described above I got this:

@import url("gtk-main.css");

Any help will be appreciated. Thank you - Howard

gm10
Level 17
Level 17
Posts: 7410
Joined: Thu Jun 21, 2018 5:11 pm

Re: scroll bar question- addtional help please

Post by gm10 » Mon Oct 08, 2018 11:30 am

Howard_P wrote:
Mon Oct 08, 2018 11:24 am
The above instructions worked as described, however when I tried it with the theme Mint-X-Blue using this, I got the following return
howard@howard-ThinkPad-T440s:~$ xed admin:///usr/share/themes/Mint-X-Blue/gtk-3.0/gtk.css

** (xed:2469): WARNING **: 08:20:12.100: The specified location is not mounted
and, in the next screen instead items described above I got this:

@import url("gtk-main.css");

Any help will be appreciated. Thank you - Howard
That means they split their css into several files. Here's a trick to find the file to modify:

Code: Select all

grep -e "scrollbar slider" /usr/share/themes/Mint-X-Blue/gtk-3.0/*
It will list any file within that folder containing scrollbar slider. Modify that then.

Howard_P
Level 3
Level 3
Posts: 122
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: scroll bar question- addtional help please

Post by Howard_P » Mon Oct 08, 2018 11:48 am

Thanks. I got this back and don't know what it means or what to do with it...

howard@howard-ThinkPad-T440s:~$ grep -e "scrollbar slider" /usr/share/themes/Mint-X-Blue/gtk-3.0/*
grep: /usr/share/themes/Mint-X-Blue/gtk-3.0/apps: Is a directory
grep: /usr/share/themes/Mint-X-Blue/gtk-3.0/assets: Is a directory
grep: /usr/share/themes/Mint-X-Blue/gtk-3.0/borders: Is a directory
/usr/share/themes/Mint-X-Blue/gtk-3.0/gtk-widgets.css:scrollbar slider {
/usr/share/themes/Mint-X-Blue/gtk-3.0/gtk-widgets.css:scrollbar slider.fine-tune {
howard@howard-ThinkPad-T440s:~$

Again, thanks and any more help will be appreciated. -Howard

gm10
Level 17
Level 17
Posts: 7410
Joined: Thu Jun 21, 2018 5:11 pm

Re: scroll bar question- addtional help please

Post by gm10 » Mon Oct 08, 2018 11:50 am

It means it found that parameter in this file:
Howard_P wrote:
Mon Oct 08, 2018 11:48 am
/usr/share/themes/Mint-X-Blue/gtk-3.0/gtk-widgets.css:scrollbar slider {
So now you edit it like this:

Code: Select all

xed admin:///usr/share/themes/Mint-X-Blue/gtk-3.0/gtk-widgets.css

Howard_P
Level 3
Level 3
Posts: 122
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: scroll bar question- addtional help please

Post by Howard_P » Mon Oct 08, 2018 11:59 am

Perfect! Thank you. How do you folks know all this stuff?! -Howard

aes2011
Level 5
Level 5
Posts: 506
Joined: Wed Jul 06, 2011 10:39 pm

Re: scroll bar question- addtional help please

Post by aes2011 » Mon Oct 08, 2018 12:01 pm

Another route could be this:

Create a text file called gtk.css in ~/.config/gtk-3.0.

Put the following code in there and save the file.
Code:

Code: Select all

*{
-GtkRange-slider-width: 12;
}
Instead of 12 use a higher or lower value as suitable.

gm10
Level 17
Level 17
Posts: 7410
Joined: Thu Jun 21, 2018 5:11 pm

Re: scroll bar question- addtional help please

Post by gm10 » Mon Oct 08, 2018 12:11 pm

aes2011 wrote:
Mon Oct 08, 2018 12:01 pm
Another route could be this:
Did you test that? I would expect the themes to override this.
Howard_P wrote:
Mon Oct 08, 2018 11:59 am
Perfect! Thank you. How do you folks know all this stuff?! -Howard
You're welcome. Once you understand the concepts the rest is easy. ;)

aes2011
Level 5
Level 5
Posts: 506
Joined: Wed Jul 06, 2011 10:39 pm

Re: (SOLVED) Re: scroll bar question- addtional help please

Post by aes2011 » Tue Oct 09, 2018 12:26 am

gm10 wrote:
Mon Oct 08, 2018 12:11 pm
aes2011 wrote:
Mon Oct 08, 2018 12:01 pm
Another route could be this:
Did you test that? I would expect the themes to override this.
Big oops!

Please try this in $HOME/.config/gtk-3.0/gtk.css:

Code: Select all

scrollbar.vertical slider,
scrollbar.vertical .slider {
    min-width: 33px;
    min-height: 42px;
    margin: 0px -1px 0px -1px;
}
It works with all the gtk3 themes on my system excluding the Breeze and Breeze Dark themes that come with Kubuntu 18.04.

It works with compiled themes such as Numix and Greybird as well the Cinnamox Kashmir Blue theme and several Mate themes.

Re. applications, it doesn't work for Google Chrome for which I use a separate stylesheet via Stylus.

Also, this works only for the user. For changing it system-wide, which I don't do, one would have to edit /etc/gtk-3.0/gtk.css.

gm10
Level 17
Level 17
Posts: 7410
Joined: Thu Jun 21, 2018 5:11 pm

Re: (SOLVED) Re: scroll bar question- addtional help please

Post by gm10 » Tue Oct 09, 2018 2:15 am

aes2011 wrote:
Tue Oct 09, 2018 12:26 am
Confirming this works. Good tip. I actually thought the themes would take precedence, had never tried.

User avatar
smurphos
Level 11
Level 11
Posts: 3716
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: (SOLVED) Re: scroll bar question- addtional help please

Post by smurphos » Tue Oct 09, 2018 2:21 am

aes2011 wrote:
Tue Oct 09, 2018 12:26 am
Big oops!

Please try this in $HOME/.config/gtk-3.0/gtk.css:
I think your original post is OK for GTK 3.18 based themes used in Mint 18.x

For GTK 3.22 based themes (Mint 19) this works for both vertical and horizontal scrollbars (after a logout)

Code: Select all

scrollbar slider {
    min-width: 12px;
    min-height: 12px;
}
Still this solution ignores GTK2 and for Cinnamon the desktop theme scrollbars. My preference for modifying themes is always to copy the theme to ~/.themes, rename it, modify it, and symlink the modified theme back to /usr/share/themes.

I don't think there is a one size fits all override for GTK2 as different themes can use different theme engines. And i'm not sure if the Cinnamon.css is overridable in this way - it probably is but not sure where the override file goes.

Does make me wonder if GTK supports scalable units for this - the basic problem here is trying to support a variety of screen resolutions under the HIDPI threshold when the X server doesn't support fractional scaling and having the scrollbar usable in all of them. I don't have any complaints about the default scroll bar sizes (other than always switching off overlay scrollbars) on my little 1366 x 768 laptop for example.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

User avatar
smurphos
Level 11
Level 11
Posts: 3716
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: (SOLVED) Re: scroll bar question- addtional help please

Post by smurphos » Tue Oct 09, 2018 2:31 am

smurphos wrote:
Tue Oct 09, 2018 2:21 am
Does make me wonder if GTK supports scalable units for this
It does... :)

I'd be interested in the results of people trying this on Mint 19.

Code: Select all

scrollbar slider {
    min-width: 1.2em;
    min-height: 1.2em;
}
It should result in GTK scrollbars scaling in proportion to your chosen default font size. Testing with different screen resolutions would be good (adjusting font sizes as necessary).
Last edited by smurphos on Tue Oct 09, 2018 2:40 am, edited 1 time in total.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

gm10
Level 17
Level 17
Posts: 7410
Joined: Thu Jun 21, 2018 5:11 pm

Re: (SOLVED) Re: scroll bar question- addtional help please

Post by gm10 » Tue Oct 09, 2018 2:39 am

smurphos wrote:
Tue Oct 09, 2018 2:31 am
I'd be interested in the results of people trying this on Mint 19.
Sure, that works, no reason it wouldn't. Only more specific stuff like @media tags are not supported but the basic units all are.

User avatar
smurphos
Level 11
Level 11
Posts: 3716
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: (SOLVED) Re: scroll bar question- addtional help please

Post by smurphos » Tue Oct 09, 2018 2:43 am

Just wondering if there is a case to look at modifying the stock themes to use em for scrollbars by default and if it would cure this perennial complaint.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

gm10
Level 17
Level 17
Posts: 7410
Joined: Thu Jun 21, 2018 5:11 pm

Re: (SOLVED) Re: scroll bar question- addtional help please

Post by gm10 » Tue Oct 09, 2018 2:51 am

smurphos wrote:
Tue Oct 09, 2018 2:43 am
Just wondering if there is a case to look at modifying the stock themes to use em for scrollbars by default and if it would cure this perennial complaint.
Worth a try, although my guess would be if you did this you would generate new complaints from people using bigger fonts due to bad eyesight but having no interest in the scrollbars getting bigger due to it. Guess we need to have a focus group test this out. :)

Post Reply

Return to “Newbie Questions”