Bug 414763

Summary: Scrollbar width change on hover changes GNOME Terminal text area size
Product: [Plasma] Breeze Reporter: Kenneth Graunke <kenneth>
Component: gtk themeAssignee: Janet Blackquill <uhhadd>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: 5.17.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.20

Description Kenneth Graunke 2019-12-02 21:09:57 UTC
SUMMARY

Using the Breeze-Dark GTK theme, the vertical scrollbar in GNOME Terminal seems to be 3 pixels wide.  Hovering over it increases the size to 6 pixels wide.  This causes the available text area in my terminal to shrink by a single letter, making the terminal re-layout the text while hovered over the scrollbar.

There are two main effects:

1. Passing the mouse over the scrollbar causes the terminal contents to jump (original, different while over scrollbar, back to original state again).
2. Grabbing the scrollbar handle is difficult because the narrower terminal leads to more lines being used for the text, which means the scrollbar handle actually gets longer or shorter.

STEPS TO REPRODUCE
1. Set Breeze-Dark under GNOME Tweaks > Appearance
2. Open GNOME Terminal
3. Type ls a few times to fill up the terminal so there is a scrollbar
4. Hover over the scrollbar with the mouse.

OBSERVED RESULT

Scrollbar becomes wider, text area becomes 1 character narrower, text jumps wildly.

EXPECTED RESULT

Text does not jump while hovered over scrollbar.

SOFTWARE/OS VERSIONS
OS: Arch Linux [testing]
KDE Plasma Version: 5.17.3
Qt Version: 5.13.2
GTK Version: 3.24.12+32+g39e28ab933

ADDITIONAL INFORMATION

Editing /usr/share/themes/Breeze-Dark/gtk-3.0/gtk.css to change min-width from 3px to 6px in the scrollbar sections fixes the issue, by making the scrollbar never change size.  I assume resizing is an intentional breeze style choice, though, so maybe there's a better fix that preserves that behavior.
Comment 1 Bug Janitor Service 2020-09-23 18:57:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze-gtk/-/merge_requests/10
Comment 2 Janet Blackquill 2020-09-23 18:59:32 UTC
Git commit 25b81e37529724ec63ad7a6586fba2f4a4b68286 by Carson Black.
Committed on 23/09/2020 at 18:57.
Pushed by cblack into branch 'master'.

[gtk3]: Make scrollbars fixed size

This better matches their behaviour in the QStyle and fixes a bug.

M  +3    -3    src/gtk3/widgets/_scrollbar.scss

https://invent.kde.org/plasma/breeze-gtk/commit/25b81e37529724ec63ad7a6586fba2f4a4b68286
Comment 3 Janet Blackquill 2020-09-23 19:12:31 UTC
Git commit eb92134aa9f9274dbc24496e9012885d2cbbe94a by Carson Black.
Committed on 23/09/2020 at 19:12.
Pushed by cblack into branch 'Plasma/5.20'.

[gtk3]: Make scrollbars fixed size

This better matches their behaviour in the QStyle and fixes a bug.

M  +3    -3    src/gtk3/widgets/_scrollbar.scss

https://invent.kde.org/plasma/breeze-gtk/commit/eb92134aa9f9274dbc24496e9012885d2cbbe94a