mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
bar: added control for font scale
This commit is contained in:
+2
-2
@@ -138,7 +138,7 @@ Singleton {
|
||||
|
||||
// The base/default font size for all texts in the bar
|
||||
readonly property real _barBaseFontSize: Math.max(1, (Style.barHeight / Style.capsuleHeight) * Style.fontSizeXXS)
|
||||
readonly property real barFontSize: (Settings.data.bar.position === "left" || Settings.data.bar.position === "right") ? _barBaseFontSize * 0.9 : _barBaseFontSize
|
||||
readonly property real barFontSize: (Settings.data.bar.position === "left" || Settings.data.bar.position === "right") ? _barBaseFontSize * 0.9 * Settings.data.bar.fontScale : _barBaseFontSize * Settings.data.bar.fontScale
|
||||
|
||||
readonly property color capsuleColor: Settings.data.bar.showCapsule ? Qt.alpha(Settings.data.bar.capsuleColorKey !== "none" ? Color.resolveColorKey(Settings.data.bar.capsuleColorKey) : Color.mSurfaceVariant, Settings.data.bar.capsuleOpacity) : "transparent"
|
||||
|
||||
@@ -211,7 +211,7 @@ Singleton {
|
||||
// Get bar font size for a specific bar height, capsule height, and orientation
|
||||
function getBarFontSizeForDensity(barHeight, capsuleHeight, isVertical) {
|
||||
const baseFontSize = Math.max(1, (barHeight / capsuleHeight) * Style.fontSizeXXS);
|
||||
return isVertical ? baseFontSize * 0.9 : baseFontSize;
|
||||
return isVertical ? baseFontSize * 0.9 * Settings.data.bar.fontScale : baseFontSize * Settings.data.bar.fontScale;
|
||||
}
|
||||
|
||||
// Convenience functions for per-screen bar sizing
|
||||
|
||||
Reference in New Issue
Block a user