10

The vertical and horizontal scroll bars in the Calc and Writer applications are too thin. Because of this I often open the Side Bar Settings Area by mistake; or aim-and-click 4 to 5 times to lock my cursor onto the vertical or horizontal scroll bar to actually scroll down or up the document I'm working in.

I have a new i5, 7th generation Lenovo Ideapad 320 and installed Ubuntu Bionic Beaver (5 days ago) from the ISO file stored on a bootable USB flash drive after I partitioned the hard drive about 50-50 between Ubuntu and Windows 10.

I have spent hours reading the "solutions" offered or tried by others, but have failed.

Screenshot of my attempt to edit the "gtk-widgets.css" file

Upon attempting to save the changes I made to the widths of the scroll bars, the error message appeared:

Error writing gtk-widgets.css: Permission denied"

(I attempted the solution posted @16:14 on 19 January by Carlos Alberto Martinez Gadea).

David Foerster
  • 35,754
  • 55
  • 92
  • 145
EJF
  • 161
  • 1
  • 1
  • 6
  • Yes, I have the same problem. I have found a solution to scrollbars in some Linux apps, e.g. Nemo: in /usr/share/themes/Mint-X [or YOUR THEME HERE]/gtk-3.0/gtk-widgets.css change: `-GtkRange-slider-width: 20;` (both occurrences). But so far I haven't found a solution for LO apps. Annoying. – mike rodent Jul 04 '18 at 18:54
  • PS I've just posted on "Ask LibreOffice": https://ask.libreoffice.org/en/question/159759/scrollbars-too-thin/ ... might be worth checking back in a week or so (often slow, not as popular as Stack Exchange). – mike rodent Jul 04 '18 at 19:10
  • Welcome to Ask Ubuntu! Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) [save the program output to a file](//askubuntu.com/q/420981/175814) and use that. Longer listings (the editor will tell you what’s too long) should be uploaded to a [pastie service](https://paste.ubuntu.com/) and linked to in the question. Thanks. – David Foerster Jul 05 '18 at 09:33

2 Answers2

9

I wouldn't apply any changes to the stock theme. You can override the stock settings. With this method you cann still change the theme and keep your changes.

$ mkdir -p ~/.config/gtk-3.0/
$ touch ~/.config/gtk-3.0/gtk.css

Open the created file in the text editor of your choice and add these lines

scrollbar {
    min-width: 15px;
    min-height: 15px;
}

Both should have the same value. The one will be applied to horizontal the other to vertical scroll bars.

This method will change the width/height for all scrollbars and not just the once in LibreOffice

Eugen M
  • 206
  • 1
  • 7
  • 1
    I found this and I love it (way better than manually editing themes)! However, I've found that you get more consistent behavior with different programs if you use `scrollbar slider` instead of `scrollbar`. – Compholio Jan 09 '22 at 16:24
1

It turns out, according to this page, that LibreOffice doesn't use GTK 3.0, but GTK 2.0. That page was written in 2013, but it still appears to be the case for LibreOffice 5.x. I don't know whether things change with LibreOffice 6.x.

First, how to change LibreOffice apps, since that's the question: Edit (as root) /usr/share/themes/Mint-X [YOUR THEME HERE]/gtk-2.0/gtkrc:

GtkScrollbar::slider-width = 20 # or whatever pixel width you want.
# NB currently set at 11 in my setup

Second, how to change GTK 3.0 apps. One day LibreOffice may emerge from the primeval swamps and switch to it. As Eugen M.'s answer draws attention to, GTK 3.0 uses CSS (Cascading Style Sheets). According to my experiments, creating a file as he suggests has no effect on any apps, for the simple reason that he is not overriding the appropriate CSS class. This does work for me:

.scrollbar {
    -GtkRange-slider-width: 20;
}

This will in fact override the settings of your GTK 3.0 theme.

You have to override "widgets" CSS file at /usr/share/themes/Mint-X [YOUR THEME HERE]/gtk-3.0/gtk-widgets.css. So, you have to override the attribute of this name for .scrollbar.

NB: You are meant to be able to override your theme's GTK 2.0 settings by creating a file ~/gtkrc-2.0 (see here).

mike rodent
  • 168
  • 7
  • 1
    Also note LibreOffice is available as a snap, and snaps do not currently respect your theme. Libroffice snap is unusable on my computer because of this: the mouse pointer while over Libreoffice is so small I can barely see it. – B.Tanner Jul 04 '18 at 20:31
  • I think ***this answer is outdated***. I had a problem with scrollbar ***height*** as well as width, in *Mint 20.1, LibreOffice **Base*** - it was simply too small for me to pick up and drag with my mouse pointer. I started by making the change under GUI control (from "Themes" menu option), but that was no good because I could only make the scrollbar ***wider*** (the height was still too small, presumably because that scales inversely with "number of records"). But I ignored 3 repeated **scrollbar slider - cinnamon-settings-generated - do not edit** lines in ./config/gtk-3.0 and all is fine! – FumbleFingers Jan 29 '21 at 16:58