What colour (from the QPalette) does Breeze's QStyle use for the QScrollBar's QSplitter?

Rationale

I’m implementing a line number area with QPen in a QPlainTextEdit. Undermentioned, you can see the line in question set to Accent:

I want to utilise the semantic colour for its separator, rather than apply #BBBDBE:

PyQt6.QtGui.QPen().setColor(PyQt6.QtGui.QColor(PyQt6.QtWidgets.QApplication.palette().color(PyQt6.QtGui.QPalette.ColorRole.Button)))

(I suppose I could use a QSplitter, but I don’t want to refactor the widget yet.)

Questions

Consequently:

  1. What colour from the QPalette (as KColorScheme exposes from the applied .colors file) does the QStyle use for the QScrollBar’s QSplitter?

  2. What opacity is it?

…or, better yet, how could I determine this myself, in the future? I ask because:

  1. None of the undermentioned appear appropriate:

    class QPalette(PyQt6.sip.simplewrapper):
    
        class ColorRole(enum.Enum):
            WindowText = ...
            Button = ...
            Light = ...
            Midlight = ...
            Dark = ...
            Mid = ...
            Text = ...
            BrightText = ...
            ButtonText = ...
            Base = ...
            Window = ...
            Shadow = ...
            Highlight = ...
            HighlightedText = ...
            Link = ...
            LinkVisited = ...
            AlternateBase = ...
            ToolTipBase = ...
            ToolTipText = ...
            PlaceholderText = ...
            Accent = ...
            NoRole = ...
            NColorRoles = ...
    
  2. …and I do not know what to look for in invent.kde.org/plasma/breeze/-/tree/9f6f7eb6f2bf61b66f0712e5975c5ed6ba2465f3/kstyle.

I’ve just realized that this probably isn’t Breeze-specific - I should probably take this to the Qt Forums, instead. Apologies if so.

Per the undermentioned, it looks OS and DE-specific, so I’ll keep it here for now:

The splitter colors are calculated in the Breeze style, they are not user modifiable (yet, i’ve wanted to make them modifiable).

1 Like

@akselmo, I’m attempting to acquire the (generic frame) colour, rather than assign a new one. Basically, I’m trying to adhere to the platform style in a custom component.

This is the method used to generate the color, if it helps kstyle/breezehelper.cpp · master · Plasma / Plasma Breeze visual style · GitLab

1 Like