KDE themes and widgits and whatnots - Scroll bar width in Firefox and LibreOffice

I still have a hard time when it comes to understanding System Settings for the desktop. The feels, and themes, and widgets, and decorations, and GTK themes I don’t know where they actually apply. But to keep things simple at the beginning, my biggest issue is the scroll bar width in Firefox and LibreOffice. I spend a lot of time trying to precisely place my mouse over the bar to scroll it up and down. How do I make it wider? Whether it’s useful or not, my current GTK2 theme is Breeze.

AFAIK FIrefox and Libreoffice are already on GTK3 ( and both indeed are GTK based apps ). Changing something like the width of the scrollbar ( don’t see the issue here on TW btw ) would mean editing the theme. Unless you are familiar with doing so, it’s going to be hard to do so.

So nothing in settings, then. Guess that’s why I hadn’t discovered it. I tried changing different GTK3 themes and no effect. But GTK2 themes do affect Firefox scroll bars. I just didn’t like the ones I tried. So how would one go about changing a GTK2 theme? I don’t mind editing files, and tried some, but not sure what to change nor how to make it active. I found something at /usr/share/themes/Breeze/gtk-2.0/widgets/scrollbar but not sure that’s the right place to change it, or if there’s some way to put it in a home directory.

Is this useful, what would you change?

  image
    {
      function      = SLIDER
      state         = ACTIVE
      file          = "../assets/scrollbar-slider-horizontal-hover.png"
      border        = { 5, 5, 5, 5 }
      stretch       = TRUE
      orientation   = HORIZONTAL

    }

or is it:
   image
    {
      function        = SLIDER
      state           = ACTIVE
      file            = "../assets/scrollbar-slider-vertical-hover.png"
      border          = { 5, 5, 5, 5 }
      stretch         = TRUE
      orientation     = VERTICAL

    }


I notice the vertical scroll-bar widths for Dolphin, Kmail and Firefox on this Leap 42.3 system are different: the Firefox bar is significantly narrower and is rendered differently. Dolphin (and probably Kmail) clearly use the “MS Windows 9x” widget style selected in System Settings, but Firefox certainly doesn’t.

I think I remember reading some time ago that Firefox was implementing more of its own display management and interfacing with the O/S at a lower level; can anyone confirm that?

Also, I’ve discovered Firefox has a really convenient mechanism for vertical scrolling. Just click the mouse scroll-wheel, and slight movement of the mouse in either dimension will then scroll the display. It’s extremely convenient when reading long articles.

DL

Personally, I very rarely use the scroll bar for scrolling – the KDE document detailing the following is here: <https://docs.kde.org/trunk5/en/kde-workspace/kcontrol/windowbehaviour/index.html> – document selection is here: <https://docs.kde.org/index.php?language=en&package=kde-workspace>.

  1. I use the “Window Behavior
    ” → “Focus” → “Focus Follows Mouse - Mouse Precedence” setting: the mouse pointer controls which window is active – except when I <Alt-Tab> between windows … 1. I simply place the mouse pointer somewhere in the window to be scrolled and, use the mouse wheel …
  2. With a Laptop and a Touchpad it’s sometimes (without a Mouse) a little bit different – there’s “edge scrolling” options on the Touchpad for vertical and horizontal
    scrolling plus “two finger” and “three finger” settings – there’s also the “Touch-Screen” options for some Laptops … 1. Having said all that, I have to admit that, I feel that I need to place the mouse pointer on the horizontal scroll bar for horizontal scrolling …

But, not for LibreOffice – I’ve just now tested with a “Calc” spreadsheet and, placing the mouse pointer on the horizontal scroll bar resulted in the mouse wheel producing vertical scrolling.

<Shift+MouseWheel> resulted in horizontal scrolling!!
[INDENT=2]«Even I learn something new on a good day! … »
[/INDENT]
[HR][/HR]Now the question: given the behaviour of Firefox and LibreOffice (GTK3) under KDE Plasma, why do you need to use the scroll bars for (vertical/horizontal) scrolling?

Tested on LibreOffice Calc just now – «Mouse-Wheel click» produced “Import options” – possibly because that’s the “Middle Mouse Button” on this system, which is usually (often) <Paste> on UNIX® GUI Editors – and indeed, also, LibreOffice Writer …

Yes, it only seems to work on Firefox, which is consistent with the browser managing more of its user interface independently rather than using the O/S. Hence the narrower Firefox scroll bars…?

DL

Yes I do use the scroll wheel. But that’s just for a short distance. And while I do notice people scrolling and scrolling and scrolling to the point of irritation, making you wonder if that wheel is going to wear out, I do not feel inclined to use the mouse wheel to go to the end of a 30 page document. Nor to the ZZ column of a spreadsheet, when a click and a drag will take you there in a fraction of a second. Provided you don’t have to spend several seconds precisely positioning your mouse over a thin line.

Other GTK2 themes allow for wide scrollbars in Firefox. I just don’t like them. I’d like the Breeze theme to have a wide scrollbar. Some things, such as titlebar is allowed to change in Firefox such as through Colors. Which I don’t know if that’s allowed because I selected the Oxygen Desktop theme, or the Oxygen Widget style, or the Breeze Window decoration. But some combination allows the color to take effect on the titlebar. Other combinations do not. The Oxygen Widget style allows the configure button to change the scrollbar width to 15px. Other’s don’t. What is more irritating that thin scrollbars is that I’ve noticed some applications make scrollbars move around. You are trying to precisely position your mouse over a thin scrollbar and the bar moves over so you have to then reposition the mouse. “Eclipse” is one application, but I’ve noticed others.

Other people create themes. Lots of them. But when I go to Get New Themes and see lots of them, and choose one to click on the details, and even though it says loading something like 24 previews, it only shows 2 or three. And while GTK2 theme details are a little better at showing something, things like window decorations and desktop themes seem more like showing their pretty desktop background images rather than what the theme does for you. There should be a standard setup that demonstrates the differences rather than non-relevant user preferences.

When I look at the first GTK2 theme shown, GoldBars, it shows a menubar that’s in gold. There’s another preview, but it’s so tiny I can’t determine anything from it. Neither one show the scrollbar. I see another one called Grissolid. It shows some sort of emblem. If I install that theme, am I going to have a giant emblem on my screen? It shows a couple of other previews. A tiny file listing and a tiny something else. Can’t tell what is being shown in either. I click on the homepage link, and it shows a preview a little bigger. I still don’t know what is being shown. The description says, “A light Gtk2 theme with relief buttons.” Which exactly means what? Do I need to install each one, reboot my system, only to find out it’s as ugly or uglier than what I have? That’s going to take a lot of time.

I wish there was something that said if I wanted to change the close button, where in all these various system settings would I go to change that with either a theme or whatnot. For example, what does GTK2 themes actually change?

People make themes. Why can’t I? Or maybe the question is, how do I go about it? I’d like to know, if I want to make the titlebar so it’s visible, or the scrollbar so it’s big enough to click on, what do I change?

To change the scrollbar width on gtk3 applications:

create “~/.config/gtk-3.0/gtk.css” with the following content

scrollbar, scrollbar button, scrollbar slider {
  min-width: 15px;
  min-height: 15px;
}

play with the pixel values (15px) to get the desired width.

If you want top/bottom scroll arrows then amend the code to

scrollbar, scrollbar button, scrollbar slider {
  -GtkScrollbar-has-backward-stepper: 1;
  -GtkScrollbar-has-forward-stepper: 1;
  -GtkScrollbar-has-secondary-backward-stepper: 1;
  min-width: 15px;
  min-height: 15px;
}

This is the result:

http://paste.opensuse.org/view/raw/eb7fbff2

Excellent! Works perfectly.

FWIW, Middle-Button-Click (Scroll-Wheel-Click) on either a LibreOffice or a Firefox vertical scroll bar will spring to that point in the document …BTW, KDE applications such as Kate also display this behaviour.

Thanks. I’ve had and effect, now just need to make it good. Looks like my Firefox fork is not GTK3, but GTK2. What’s interesting is I can change the theme in system settings and it won’t take affect until restarting the browser. But testing GTK3 in LibreOffice first, and then changing the GTK2 theme will instantly affect Firefox when hitting Apply. Which is nice for testing.

I seem to have messed something up in Office as I have a wide scrollbar, but the active part is shifted left about 5 pixels so that there’s two parts. Using the Breeze theme, the left half is dark blue and the right 5 pixels is light blue. You can click and drag an area about 5 pixels to the left of anything visible, but if you click in the light blue area on the right, it won’t scroll. Like the active part is shifted to the left.

Awesome! lol! worked for me with “minty green” gtk theme

Is there a similar fix for KDE?

This IS for KDE… for running GTK applications under KDE. Is that what you meant? :wink:

I understand this is for gtk applications when using the KDE desktop. That’s why I’ve applied that css file.

However, the KDE desktop has a similar problem with narrow scrollbars. And I can’t seem to change them. Under “Application Style” > “Widget Style” and clicking the configure button, I can only choose whether to have the arrows on the scrollbar.

I don’t use Plasma much. KDE3 is still my primary DE. It’s been long since I messed with this in Plasma, but I think I widened the scrollbars via either look&feel->Oxygen and/or widget style->Oxygen and/or window decorations->theme->Plastik, all of which are currently set here. For gtk2 I have Oxygen, and gtk3 Adwaita.

Unfortunately if you’re using “Breeze” widget style then scrollbar width is fixed.

If you change the widget style to Oxygen then width becomes adjustable…

An afterthought, as I knew I’d read it somewhere a while back…

Last two comments from a “discussion” on phabricator re “make scrollbar size configurable” https://phabricator.kde.org/D3210

We ends with no configurable scrollbar size at all, it has plan for this really ?

Indeed. This was deemed unnecessary (see discussion above), with respect to the added code complexity.

… unfortunately members of the VDG are opposed to the idea, (can’t have users messing with our lovely design, using the oft quoted reason of “code complexity” - something that is IMHO rather pervasive in plasma 5)

Unfortunately, that advice doesn’t work anymore.

OpenSUSE Leap 15 only provides:

  1. Breeze
  2. Fusion
  3. MS Windows 9x
  4. gtk2

as widget styles. headdesk

Get Hot New Stuff is also available for every other look-and-feel option—except widget style. And going to https://store.kde.org/browse/cat/421/ doesn’t provide a lot of widget styles. Searching for Oxygen on store.kde.org gives you a lot of results, but few are from the last 4 years and none are relevant.

So, it seems the original Oxygen theme has vanished.

Oxygen isn’t available as an option. Nor is it available from store.kde.org — they seem to have erased it.

I don’t mind that attitude provided they assure the design is usable. The current scrollbar width simply isn’t fit for purpose.