How to change theme's active text foreground colour in binder

Does anyone know how to change the text color in the binder when you are typing? Not the text color after you type, but the active text. There seems to be nowhere to do this for me and I haven’t yet found a theme I like.

That’s a challenging question . I think the text might be temporarily replaced by a Textbox, so it might be possible. And the Treeview nodes have many states that could be accessed through the QSS-Stylesheet, as well.

There are chances this could be achieved in a Theme, but I’ll have to investigate…

Why do you want to change the coloring of the text in the Binder while typing?

I am customizing a theme and for some reason, when I make the binder darker, the text in the editor when you double click the binder titles is the same color as the background for selected text. They are both white, and I can’t see the text. Whereas, if I use one of the default themes, the text is contrasted to work. I can’t figure it out and I didn’t want to have to rewrite any code. I have another theme I could upload but it isn’t quite the color scheme I want. It’s appearing to me that scrivener is defaulting the text color for this particular function based off whatever rules it has, and there isn’t an definitive place to change it in the editor itself. And I don’t know what line it would be in CSS if I edited the theme itself.

Well, the code to insert in the QSS of your Theme is actually rather simple:

SCRBinder QLineEdit { 
   color: red;
}

After double-clicking the item in the Treeview, the text will be selected and shown on white in the TreeView-item Selected color. Clicking inside the QLineEdit object (the textbox) will show the text in the color appointed in the code above.

You might also be interested in the selection color and selection background color:

   selection-color: black;
   selection-background-color: cyan;

After renaming an item, the text will show up as either white or black, depending on the shade of the TreeView-item’s background color.

Hope this helps

Ah, okay! I will try this. Thank you. I’m much more adept at manipulating the current code than having to start all over since there were only a few key points I wanted to change. I will report back once I do this. :slight_smile: Thank you again!!

1 Like