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:
-
What colour from the
QPalette
(asKColorScheme
exposes from the applied.colors
file) does theQStyle
use for theQScrollBar
’sQSplitter
? -
What opacity is it?
…or, better yet, how could I determine this myself, in the future? I ask because:
-
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 = ...
-
…and I do not know what to look for in
invent.kde.org/plasma/breeze/-/tree/9f6f7eb6f2bf61b66f0712e5975c5ed6ba2465f3/kstyle
.