[Tex/LaTex] Color of marked Text in TeXStudio

syntax highlightingtexstudio

I created a darker theme for TeXStudio and have problems with the
color of the text when I mark it with the cursor:

Color of marked Text

The first line is marked and I cannot change its color.
I searched every line in the settings, but I donĀ“t find it.
Maybe you have an idea if it is possible?

Niklas

Best Answer

The colour of the selection is set by your OS settings by default in TXS. As of now (TXS version 2.12.8), the option to change the colour of this element is not available in the general settings of TXS, I believe.

The solution now is to use QSS stylesheets, discussed partially in the project Github thread.

Basically, create a file stylesheet.qss, and place it in your TXS settings folder. Paste this in:

QWidget {
    selection-background-color: #db1c49;
    selection-color: #eff0f1;
}

and restart TXS.

Note:

  • Change the colours as you see fit. selection-background-color controls the highlight colour (now red), and selection-color is the colour of the words (now white).

  • This also affects other elements in TXS, since this affects all QWidgets. There are ways to localize this I'm guessing, but I'm no expert in this regard.

enter image description here