2

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

4
  • 1
    I'm not 100% on this, but I think TXS takes this from your OS settings and I don't think it's in the default TXS settings. You can try playing around with QSS stylesheets instead.
    – Troy
    Apr 23, 2018 at 22:36
  • It is using the OS settings, but I don´t want the color of TeXStudio highlights in whole os. Do you have a idea how to change it with QSS stylesheets? First try with QTextEdit { selection-background-color: rgb(140, 90, 64) } did not work.
    – Niklas
    Apr 24, 2018 at 3:07
  • QWidget { selection-background-color: #db1c49; selection-color: #eff0f1; }?
    – Troy
    Apr 24, 2018 at 7:29
  • This works! Thank you! Maybe you add this as an answer if you want.
    – Niklas
    Apr 24, 2018 at 18:17

1 Answer 1

6

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .