mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Bar: replace more direct Style.barHeight acces by the new Style.getBarHeightForScreen()
This commit is contained in:
@@ -78,6 +78,7 @@ Variants {
|
||||
|
||||
readonly property string barPos: Settings.getBarPositionForScreen(notifWindow.screen?.name)
|
||||
readonly property bool isFloating: Settings.data.bar.floating
|
||||
readonly property real barHeight: Style.getBarHeightForScreen(notifWindow.screen?.name)
|
||||
|
||||
readonly property int notifWidth: Math.round(440 * Style.uiScaleRatio)
|
||||
readonly property int shadowPadding: Style.shadowBlurMax + Style.marginL
|
||||
@@ -87,28 +88,28 @@ Variants {
|
||||
if (barPos !== "top")
|
||||
return 0;
|
||||
const floatMarginV = isFloating ? Math.ceil(Settings.data.bar.marginVertical) : 0;
|
||||
return Style.barHeight + floatMarginV;
|
||||
return barHeight + floatMarginV;
|
||||
}
|
||||
|
||||
readonly property int barOffsetBottom: {
|
||||
if (barPos !== "bottom")
|
||||
return 0;
|
||||
const floatMarginV = isFloating ? Math.ceil(Settings.data.bar.marginVertical) : 0;
|
||||
return Style.barHeight + floatMarginV;
|
||||
return barHeight + floatMarginV;
|
||||
}
|
||||
|
||||
readonly property int barOffsetLeft: {
|
||||
if (barPos !== "left")
|
||||
return 0;
|
||||
const floatMarginH = isFloating ? Math.ceil(Settings.data.bar.marginHorizontal) : 0;
|
||||
return Style.barHeight + floatMarginH;
|
||||
return barHeight + floatMarginH;
|
||||
}
|
||||
|
||||
readonly property int barOffsetRight: {
|
||||
if (barPos !== "right")
|
||||
return 0;
|
||||
const floatMarginH = isFloating ? Math.ceil(Settings.data.bar.marginHorizontal) : 0;
|
||||
return Style.barHeight + floatMarginH;
|
||||
return barHeight + floatMarginH;
|
||||
}
|
||||
|
||||
// Anchoring
|
||||
|
||||
Reference in New Issue
Block a user