Score:1

Ubuntu 22.04 change scrollbar width

hn flag

In Ubuntu 22.04 I have tried to edit the Yaru-blue theme gtk.css file to make the scrollbar wider.

I entered

sudo gnome-terminal

to open a second terminal as root. In that root terminal I entered

cd /usr/share/themes/Yaru-blue/gtk-4.0

then entered

gedit gtk.css

to edit the css file.

In the gedit window below the line

@import url("resource:///com/ubuntu/themes/Yaru-blue/4.0/gtk.css");

I entered

scrollbar slider { min-width: 20px; min-height: 20px; border-radius: 22px; border: 5px solid transparent; }

and saved the file.

In the root terminal window I saw

** (gedit:297357): WARNING **: 16:14:44.503: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported

The scrollbar width was unchanged; i.e. very narrow.

What am I doing wrong?

Score:1
hn flag

The answer to this question was taken from an answer to a similar question that was posted at Scrollbar width in Qt applications on Jan. 11, 2021

The solution is to edit the file ~/.config/gtk-3.0/gtk.css by adding the code

scrollbar, scrollbar button, scrollbar slider {
  -GtkScrollbar-has-backward-stepper: true;
  -GtkScrollbar-has-forward-stepper: true;
  min-width: 20px;
  min-height: 20px;
  border-radius: 0;
}

This works in Ubuntu 22.04 and does not require being root.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.