Use Color.foreground / Style.font.family for fallbacks
Five sites hardcoded "#cacccc" or "JetBrainsMono Nerd Font" as the fallback when no bar context was available. Those magic strings are the *current* palette defaults — they diverge silently when the theme changes. Bind to the Color / Style singletons so the fallback tracks whatever the theme says the foreground / monospace family should be. Color.qml itself keeps the literal "#cacccc" — that's the seed value the singleton is bootstrapped with before the theme loads.
This commit is contained in:
@@ -33,8 +33,8 @@ BarWidget {
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
text: root.title
|
||||
color: root.bar ? root.bar.foreground : "#cacccc"
|
||||
font.family: root.bar ? root.bar.fontFamily : "JetBrainsMono Nerd Font"
|
||||
color: root.bar ? root.bar.foreground : Color.foreground
|
||||
font.family: root.bar ? root.bar.fontFamily : Style.font.family
|
||||
font.pixelSize: Style.font.body
|
||||
elide: Text.ElideRight
|
||||
opacity: 0.85
|
||||
|
||||
@@ -87,8 +87,8 @@ BarWidget {
|
||||
property bool active: false
|
||||
|
||||
text: glyph
|
||||
color: active ? (root.bar ? root.bar.foreground : "#cacccc") : Qt.rgba(0.7, 0.7, 0.7, 0.3)
|
||||
font.family: root.bar ? root.bar.fontFamily : "JetBrainsMono Nerd Font"
|
||||
color: active ? (root.bar ? root.bar.foreground : Color.foreground) : Qt.rgba(0.7, 0.7, 0.7, 0.3)
|
||||
font.family: root.bar ? root.bar.fontFamily : Style.font.family
|
||||
font.pixelSize: Style.font.bodySmall
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,8 +233,8 @@ BarWidget {
|
||||
property string title: ""
|
||||
property string value: ""
|
||||
property var history: []
|
||||
property color barFg: "#cacccc"
|
||||
property string fontFamily: "JetBrainsMono Nerd Font"
|
||||
property color barFg: Color.foreground
|
||||
property string fontFamily: Style.font.family
|
||||
|
||||
spacing: Style.space(4)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user