[SOLVED] How to change the scrollbars in mint 20?

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
RiverRanch
Level 2
Level 2
Posts: 89
Joined: Tue Oct 18, 2016 9:30 am

[SOLVED] How to change the scrollbars in mint 20?

Post by RiverRanch »

I've fixed this for vers 16,17,18,and 19, but I don't remember how to do it, or if it's even possible in 20? If I remember correctly, I did something with the css?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mate 20
RiverRanch
Level 2
Level 2
Posts: 89
Joined: Tue Oct 18, 2016 9:30 am

Re: [SOLVED, mostly] How to change the scrollbars in mint 20?

Post by RiverRanch »

In mint 20, go to /usr/share/themes/Mint-X/gtk-3.0/gtk-widgets.css. Open Mint-X as an administrator. (You need to do this before going into Mint-X/gtk-3.0 - gtk-widgets.)

Open gtk-3.0, search for 'scrollbar' which will take you down to the scrollbar portion.

-GtkScrollbar-has-backward-stepper: 1;
-GtkScrollbar-has-forward-stepper: 1; both from 0 to 1. This gives you the scrollbar arrows.

Next line down.
scrollbar.vertical {
border-style: solid;
border-color: alpha(@border, 0.5);
border-width: 0 0 0 16px;
background-image: linear-gradient(to right,
@theme_bg_color,
@theme_base_color);
Change border width: to 16 or if you don't like them that large, less.

scrollbar slider {
min-width: 16px;
min-height: 10px;
margin: -1px;
margin-top: 2px;
margin-bottom: 2px;
border: 1px solid @border;
border-radius: 8px;
background-clip: padding-box;
background-color: transparent;
background-image: linear-gradient(to right,
shade(@theme_bg_color, 1.12),
shade(@theme_bg_color, 0.95));

Change min-width: to 16 or whatever you are using above.

Now go down to:
/* Adding support for scrollbar buttons so it's easier for users who really want
* them to enable them. */

scrollbar button {
min-width: 16px;
min-height: 10px;
padding: 2px;
border-radius: 0;
Change min-width: to 16, or again, whatever you are using from above.

There might be an easier way but this worked for me.
Reboot to see your changes. (at least I did)

The only problem I now have is Firefox. Would not take the changes, although Waterfox and Thunderbird did.
Mate 20
ajgreeny
Level 7
Level 7
Posts: 1662
Joined: Mon Nov 19, 2007 3:27 pm

Re: [SOLVED, mostly] How to change the scrollbars in mint 20?

Post by ajgreeny »

I have added a file ~/.config/gtk-3.0/gtk.css with the content

Code: Select all

/* Set thickness of scrollbars */
.scrollbar.vertical slider,
scrollbar.vertical slider {
    min-width: 12px;
    background-color: #34a853;
}

.scrollbar.horizontal.slider,
scrollbar.horizontal slider {
    min-height: 12px;
    background-color: #34a853;
}

.scrollbar.vertical.slider:hover,
scrollbar.vertical:hover slider {
    min-width: 12px;
}

.scrollbar.horizontal.slider:hover,
scrollbar.horizontal:hover slider {
    min-height: 12px;
}

/* Include scrollbar steppers */
.scrollbar,
scrollbar {
    -GtkScrollbar-has-backward-stepper: 1;
    -GtkScrollbar-has-forward-stepper: 1;
}

scrollbar button {
min-width: 20px;
min-height: 20px;
}
There are various changes you can make to that to change the size of the scrollbar buttons or the colour codes but for my use it was simply great to get back the scrollbar behaviour that seemed to have disappeared form all windows and all distros that i've tried.
This gtk.css file has an effect on the firefox window as well as just about all of my other applications; I don't think there are any where it does not work.
RiverRanch
Level 2
Level 2
Posts: 89
Joined: Tue Oct 18, 2016 9:30 am

Re: [SOLVED, mostly] How to change the scrollbars in mint 20?

Post by RiverRanch »

Are you aware that this is in Mint 20?
Mate 20
ajgreeny
Level 7
Level 7
Posts: 1662
Joined: Mon Nov 19, 2007 3:27 pm

Re: [SOLVED, mostly] How to change the scrollbars in mint 20?

Post by ajgreeny »

Yes, I am.
Why do you ask?
RiverRanch
Level 2
Level 2
Posts: 89
Joined: Tue Oct 18, 2016 9:30 am

Re: [SOLVED, mostly] How to change the scrollbars in mint 20?

Post by RiverRanch »

Well, it seems like most of your file is different than mine?
My gtk.css only has one line it it and my gtk-widgets.css doesn't match yours.

Now, if I'm supposed to add your file to gtk.css, will that effect my current edits in gtk-widgets?
Mate 20
ajgreeny
Level 7
Level 7
Posts: 1662
Joined: Mon Nov 19, 2007 3:27 pm

Re: [SOLVED, mostly] How to change the scrollbars in mint 20?

Post by ajgreeny »

I did not have a gtk.css file until I created it, and I'm not sure about your gtk-widgets.css which I don't have in ~/.config/gtk‐3.0 either.

I assume you noticed I am not dealing with anything in themes, but the general gtk-3.0 folder in .config in my home.
RiverRanch
Level 2
Level 2
Posts: 89
Joined: Tue Oct 18, 2016 9:30 am

Re: [SOLVED, mostly] How to change the scrollbars in mint 20?

Post by RiverRanch »

Sigh... I didn't notice!
Mate 20
pinguino58
Level 1
Level 1
Posts: 8
Joined: Wed May 06, 2020 8:16 pm

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by pinguino58 »

I followed the suggestions but still can't get Firefox to change the scrollbar width.
Everything else seems ok.
ajgreeny
Level 7
Level 7
Posts: 1662
Joined: Mon Nov 19, 2007 3:27 pm

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by ajgreeny »

The firefox scrollbar width can be changed using about:config in the addressbar, taking you to the detailed configuration page.

Accept the warning when you go there, but do be careful.
Search for the widget.non-native-theme.scrollbar.size entry which I think has a default of 12 and change that to 24 or something similar (mine is 24 and works well on my screen).
Click on the tick mark at the right hand end of the line to save it.
jazz.h
Level 4
Level 4
Posts: 363
Joined: Sat Jun 18, 2011 7:13 am

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by jazz.h »

ajgreeny wrote: Sun Aug 01, 2021 6:29 am Search for the widget.non-native-theme.scrollbar.size entry which I think has a default of 12 and change that to 24 or something similar (mine is 24 and works well on my screen).
Thx, this worked like a charm :)
Aztaroth
Level 5
Level 5
Posts: 764
Joined: Mon Jan 11, 2021 1:48 am

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by Aztaroth »

pinguino58 wrote: Sun Aug 01, 2021 12:18 am I followed the suggestions but still can't get Firefox to change the scrollbar width.
Everything else seems ok.
Is your Firefox the mint-based one or is it a flatpak, firejailed, app-armored or something else sandboxing it ?
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
pinguino58
Level 1
Level 1
Posts: 8
Joined: Wed May 06, 2020 8:16 pm

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by pinguino58 »

uh, how do I find out? It is what came with 20.2.
It updated to 90.0.2
pinguino58
Level 1
Level 1
Posts: 8
Joined: Wed May 06, 2020 8:16 pm

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by pinguino58 »

finally figured it out using the recommendation of about:config change in firefox.

thanks for the tip.
jazz.h
Level 4
Level 4
Posts: 363
Joined: Sat Jun 18, 2011 7:13 am

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by jazz.h »

This doesn't work anymore in FF 96.3? :?
ajgreeny
Level 7
Level 7
Posts: 1662
Joined: Mon Nov 19, 2007 3:27 pm

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by ajgreeny »

jazz.h wrote: Sun Jan 30, 2022 5:15 am This doesn't work anymore in FF 96.3? :?
No, you're correct.

You now to use the override line in the widget.non-native-theme.override instead and set it to 20 or whatever you want..
jazz.h
Level 4
Level 4
Posts: 363
Joined: Sat Jun 18, 2011 7:13 am

Re: [SOLVED] How to change the scrollbars in mint 20?

Post by jazz.h »

ajgreeny wrote: Sun Jan 30, 2022 6:33 am
jazz.h wrote: Sun Jan 30, 2022 5:15 am This doesn't work anymore in FF 96.3? :?
No, you're correct.

You now to use the override line in the widget.non-native-theme.override instead and set it to 20 or whatever you want..
Yeah, that solved it :D
Locked

Return to “Beginner Questions”