Changing the separator colors in a custom Windows theme

I’m working on a custom theme for the Windows version of Scrivener and I want to change the color of the separators between panes/icons across the UI.
This line of code:

QSplitter::handle:hover {
    background: palette(highlight);

in the QSS file allows me change the color of adjustable separators (such as those that allow you to contract/expand the binder and inspector panes) when hovered, but I don’t see a corresponding line of code to change the color of the bars themselves.
I tried targeting them by adding a background color to this line of code:

QMainWindow::separator {
    width: 6px;
    height: 5px;
    padding: 2px;
    background: palette(dark);

But no joy.

Has anyone had success changing the separator colors via the QSS file?

Apparently I can’t edit posts, so here’s an imgur link to an example of the separators I’m trying to change

This should be no problem.
Maybe you expect a different result:
This style affects the two vertical dividers between the Binder and Editor, and between the Editor and the Inspector. This will also work for horizontal dividers between Panes (like the Synopsis and Notes pane in the Notes. tab of the Inspector).

The Dark color in the Palette may be invisible to you. The Height you give it may also make them invisible.

QSplitter::handle:hover {
background: rgba(128,0,0,1);
should make them Red.

For the Toolbar Dividers, QToolBar::top, bottom, left and right might do the trick. These are at the bottom of the QSS-file.


1 Like