Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-06-16 08:48:44

Friedrich
Member
Registered: 2016-09-18
Posts: 62

Edit the scrollbar size

Hi,

i'm on xubuntu 18.04 and i have edited the scrollbar size for gtk2.0 applications by adding this

style "myscrollbar"
{
     GtkScrollbar::slider-width=12
}
class "GtkScrollbar" style "myscrollbar"

to the file ~/.gtkrc2.0 and it works. but i don't have a bigger scrollbar in firefox and thunderbird. for gtk3.0 on xubuntu 16.04 i found a solution here https://askubuntu.com/questions/775201/ … -scrollbar (second post), but the file gtk-widgets.css doesn't exist anymore on my xubuntu 18.04 installation. there was also an answer in the last post (edit ~/.config/gtk-3.0/gtk.css) but this also doesn't work, even not after logging out the user.

is there something changed in gtk3.0 on xubuntu 18.04?

friedrich

Offline

#2 2018-06-16 13:00:41

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,962

Re: Edit the scrollbar size

Try this in ~/.config/gtk-3.0/gtk.css:

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

...and restart firefox.

Offline

#3 2019-12-26 17:30:42

John Jason Jordan
Member
Registered: 2019-11-22
Posts: 37

Re: Edit the scrollbar size

ToZ wrote:

Try this in ~/.config/gtk-3.0/gtk.css:

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

On my Xubuntu 18.04 (up to date), with Xfce 4.12, I have the folder ~/.confg/gtk-3.0/, but it does not contain a file gtk.css, although I do have the file custom-papers. In most applications on my UHD display my vertical scrollbars are the width of a pencil lead - really hard to ht with the mouse. Apologies for resurrecting a thread that is now a year and a half old, but it's exactly what I need.

Edit: I went ahead and created the file ~/.config/gtk-3.0/gtk.css and put the above into it. Then I closed and re-launched Firefox, and it worked. smile But the bad news is that it seems to have worked for Firefox, but not for any of my other applications. sad

Last edited by John Jason Jordan (2019-12-26 21:53:59)

Offline

#4 2019-12-27 01:05:03

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,962

Re: Edit the scrollbar size

John Jason Jordan wrote:

Edit: I went ahead and created the file ~/.config/gtk-3.0/gtk.css and put the above into it. Then I closed and re-launched Firefox, and it worked. smile But the bad news is that it seems to have worked for Firefox, but not for any of my other applications. sad

Try logging out and back in again. The gtk.css settings may be cached by some programs.

If it still doesn't work, which programs is it not working for?

Offline

#5 2019-12-27 19:46:18

John Jason Jordan
Member
Registered: 2019-11-22
Posts: 37

Re: Edit the scrollbar size

ToZ wrote:
John Jason Jordan wrote:

Edit: I went ahead and created the file ~/.config/gtk-3.0/gtk.css and put the above into it. Then I closed and re-launched Firefox, and it worked. smile But the bad news is that it seems to have worked for Firefox, but not for any of my other applications. sad

Try logging out and back in again. The gtk.css settings may be cached by some programs.
If it still doesn't work, which programs is it not working for?

I did more than log out - we had a power failure here that lasted eight hours, far too long for my UPS, so everything ended up going down. When I rebooted about half of my apps have decent scrollbars (I set it to 30px) and the rest do not. And I should add that before everything was shut down I also added the file ~/.config/gtk-2.0/gtkrc with the following:

style "myscrollbar"
{
GtkScrollbar::slider-width=30
}
class "GtkScrollbar" style "myscrollbar"

Examples of applications that still have scrollbars the width of a pencil lead are Claws Mail and three of my file managers (Thunar, PCManFM, X File Manager), although Nautilus, Krusader and Konqueror are now correct. K3b is now correct, but the Task Manager window is still narrow. Evince and Okular are now OK, but Adobe Reader 9 and xpdf are still thin, as are Inkscape and the GIMP. The entire LibreOffice suite is still thin, plus the Styles menu in Writer has the entries all on top of each other (illegible) because of inadequate line spacing. (I am using 6.3, downloaded from OO, not the version from the 18.04 repositories.)

I could go on, but hopefully the above list will provide some patterns to help figure out what to try next.

Offline

#6 2019-12-27 23:52:28

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,962

Re: Edit the scrollbar size

For GTK2 apps, you would need to use ~/.gtkrc-2.0 (not ~/.config/gtk-2.0/gtkrc). Move the code snippet to the new file.

Offline

#7 2019-12-28 01:19:54

John Jason Jordan
Member
Registered: 2019-11-22
Posts: 37

Re: Edit the scrollbar size

ToZ wrote:

For GTK2 apps, you would need to use ~/.gtkrc-2.0 (not ~/.config/gtk-2.0/gtkrc). Move the code snippet to the new file.

Aha! Now I'm making big progress. Adobe Reader and xpdf are still thin, but I rarely use either of them anyway. Everything else from my list above is fine now, except LibreOffice. I don't know if it uses GTK or QT or black magic. I have already posted the issue on the LO mailing list. Hopefully someone can come up with a solution.

Thanks a lot for all your help!

Offline

#8 2019-12-28 09:14:10

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Edit the scrollbar size

John Jason Jordan wrote:
ToZ wrote:

For GTK2 apps, you would need to use ~/.gtkrc-2.0 (not ~/.config/gtk-2.0/gtkrc). Move the code snippet to the new file.

Aha! Now I'm making big progress. Adobe Reader and xpdf are still thin, but I rarely use either of them anyway. Everything else from my list above is fine now, except LibreOffice. I don't know if it uses GTK or QT or black magic. I have already posted the issue on the LO mailing list. Hopefully someone can come up with a solution.

Thanks a lot for all your help!

Black magic- I love it.
Odd, though, because LibreOffice uses GTK. I just looked using an oddball theme with oddball scrollbars and sure enough, they are present on mine (They look like shock absorbers- long story, don't ask.)
So your adjustments should take effect on LibreOffice, as well.

Offline

#9 2019-12-28 12:50:26

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,962

Re: Edit the scrollbar size

Xubuntu 18.04 seems to have separate libreoffice support packages for gtk2, gtk3, kde, kde4. Make sure you have one of them installed. (by default it looks like libreoffice-gtk3 is installed).

Also, for your ~/.config/gtk-3.0/gtk.css file, use something like this (to cover both vertical and horizontal scroll bars:

scrollbar.vertical slider {
   min-width: 30px;
}
scrollbar.horizontal slider {
   min-height: 30px;
}

Offline

#10 2019-12-28 20:09:10

John Jason Jordan
Member
Registered: 2019-11-22
Posts: 37

Re: Edit the scrollbar size

ToZ wrote:

Xubuntu 18.04 seems to have separate libreoffice support packages for gtk2, gtk3, kde, kde4. Make sure you have one of them installed. (by default it looks like libreoffice-gtk3 is installed).

That is interesting. When I downloaded 6.3.3.2 the tar.gz file contained about 20 .deb files, and I installed all of them. They included libobasis6.3-kde-integration_6.3.3.2-2_amd64 and libobasis6.3-gnome-integration_6.3.3.2-2_amd64, but nothing specifically mentioning gtk*. Yet you are right, there are .deb files in the Ubuntu 18.04 repositories for gtk, gtk2 and gtk3, in addition to gnome and kde files. I tried to install just the gtk3 file to see if it would work with the 6.3.3.2 version that I have installed, but it required a dozen more files - basically the rest of the suite. It looks like I'm going to have to uninstall 6.3.3.2 and install LO from the repositories instead.

Here is a screenshot: Screenshot

Offline

Board footer

Powered by FluxBB