1

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

  • 2
    I think this is controlled by the underlying window manager or OS. I don't know many programs that allow to change the color of scroll bars other than to use system settings/control panel – user31729 Jan 4 at 8:09
4

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.

  • one needs to restart TeXstudio to load the .qss file. You could add to your answer that #rrggbb are HEX colors and you can easily pick a color with w3schools. The important lines for my questions are line 5 and 6. – Markus Hauschel Jan 5 at 9:30
3

At least in my computer the style of the scrollbar of TexStudio is not affected anyway by the changes in the desktop themes (that change the scrollbar of other programs, like Firefox).

Therefore the solution must be Menu Options > Configure TeX studio > change default Style and maybe also the color Scheme.

I am not sure if you have the same options here, so your mileage may vary, but in my Linux Mint there are a "Breeze" style that produce a cyan scrollbar button over a white or gray background (with the pointer over the scrollbar). Not too much contrast, but much more visible that a light gray button over a light gray background.

  • I agree that this is a problem in TexStudio default settings on windows. The scrollbar is almost invisible. Thanks to Fran above I changed the style from fusion to default and it is now all good. – Aubrey Blumsohn Jan 4 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.