mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(bar): capsule_foreground was not always respected
This commit is contained in:
@@ -17,7 +17,7 @@ ColorSpec Widget::widgetForegroundOr(const ColorSpec& fallback) const noexcept {
|
||||
return *m_widgetForeground;
|
||||
}
|
||||
const auto& spec = m_barCapsuleSpec;
|
||||
if (spec.enabled && spec.foreground.has_value() && shouldShowBarCapsule()) {
|
||||
if (spec.enabled && spec.foreground.has_value()) {
|
||||
return *spec.foreground;
|
||||
}
|
||||
return fallback;
|
||||
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
// Whether the bar should paint the decorative capsule for this frame (spec enabled + visible ink).
|
||||
[[nodiscard]] virtual bool shouldShowBarCapsule() const;
|
||||
|
||||
// Resolved icon + primary label color: `[widget.*] color` when set, else `capsule_foreground` when the capsule is
|
||||
// visible, else `fallback` (e.g. colorSpecFromRole(OnSurface)).
|
||||
// Resolved icon + primary label color: `[widget.*] color` when set, else `capsule_foreground` when capsule styling is
|
||||
// enabled, else `fallback` (e.g. colorSpecFromRole(OnSurface)).
|
||||
[[nodiscard]] ColorSpec widgetForegroundOr(const ColorSpec& fallback) const noexcept;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user