[Tex/LaTex] How to change color of scrollbar

texstudio

is it possible to change the color of the scrollbar in Texstudio?
The first picture represents the standard of Texstudio using style Fusion and Color Scheme Modern with a dark background. The second picture is picture with a colorized scrollbar.

I think it's quite hard to distinguish between the colors of the scrollbar and (?) the background behind the scrollbar. Maybe it's the colors of my screen, but it would be great to change it to a color with a higher contrast.

Thanks in advance!

standard
edited

Best Answer

enter image description here

This is a function of the QT canvas so you need to add a stylesheet.qss (QtStyleSheet) file to the settings directory see where-are-the-settings-stored

For the green scrollbars I simply copied the example sections

QScrollBar:horizontal { border: 2px solid grey; background: #32CC99; height: 15px; margin: 0px 20px 0 20px; }
QScrollBar::handle:horizontal { background: white; min-width: 20px; }
QScrollBar::add-line:horizontal { border: 2px solid grey; background: #32CC99; width: 20px; subcontrol-position: right; subcontrol-origin: margin; }
QScrollBar::sub-line:horizontal { border: 2px solid grey; background: #32CC99; width: 20px; subcontrol-position: left; subcontrol-origin: margin; }
QScrollBar:vertical { border: 2px solid grey; background: #32CC99; width: 15px; margin: 22px 0 22px 0; }
QScrollBar::handle:vertical { background: white; min-height: 20px; }
QScrollBar::add-line:vertical { border: 2px solid grey; background: #32CC99; height: 20px; subcontrol-position: bottom; subcontrol-origin: margin; }
QScrollBar::sub-line:vertical { border: 2px solid grey; background: #32CC99; height: 20px; subcontrol-position: top; subcontrol-origin: margin; }
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { border: 2px solid grey; width: 3px; height: 3px; background: white; }
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; }

From this page customizing-qscrollbar

Of course there are others available but these are the core ones for your experimental mods. To start slowly, change one of the #rrggbb e.g. #32CC99 (grenish blue) to say #222222 and observe the effect. Each rgb HEX color ranges from dark 00 to bright FF for possible values there are several theme or color wheel pickers see W3schools Hex Calculator

[Edit] from Markus's own observations. (some improvements above)

1) You will needs to restart TeXstudio to load/reload the .qss file during modifications.

2) The important lines for his question were lines 5 and 6 of the above example.