Miss documentation, Bar plugin API: documented bar.foreground doesn't match the color native widgets actually use (bar.barForeground)
#10437
aryanhv
started this conversation in
Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
shell/plugins/bar/README.md("Bar properties available to widgets") documentsbar.foregroundas the color third-party bar widgets should use for their text/icons:However, every first-party widget (Workspaces, Clock, Weather, Microphone, etc.)
renders its text through
Ui/WidgetButton.qml, which does not usebar.foreground.It uses a different, undocumented property:
On themes where
foregroundandbarForegrounddiverge (Everforest, for example),a third-party widget written strictly against the documented API ends up a visibly
different color than every native widget sitting next to it in the bar.
Steps to reproduce
Expected
bar.foreground(the documented property) should produce the same color nativewidgets use for their on-bar text, since that's the only theming API third-party
widgets have.
Actual
bar.barForeground.bar.foreground.bar.foregroundresolves to a light color whilebar.barForeground(what's actually rendered natively) resolves to black — so a plugin following
the documented API visibly clashes with the rest of the bar.
Suggested fix (either resolves it)
bar.barForegroundin the "Bar properties available to widgets" table, orbar.foregroundresolve to the same valueWidgetButtoncurrently gets frombarForeground, so the documented property is the correct one.Environment
shell/Ui/WidgetButton.qml,shell/plugins/bar/README.mdAll reactions