mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge branch 'main' of github.com:noctalia-dev/noctalia-shell
This commit is contained in:
@@ -171,6 +171,7 @@ Item {
|
||||
fillColor: root.fillColor
|
||||
showMinimumSignal: true
|
||||
vertical: root.isVerticalBar
|
||||
barPosition: Settings.data.bar.position
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -392,6 +392,7 @@ Item {
|
||||
values: CavaService.values
|
||||
fillColor: Color.mPrimary
|
||||
opacity: 0.4
|
||||
barPosition: Settings.data.bar.position
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,14 +82,14 @@ Variants {
|
||||
if (barPos !== "left")
|
||||
return 0;
|
||||
const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0;
|
||||
return floatMarginH;
|
||||
return Style.barHeight + floatMarginH;
|
||||
}
|
||||
|
||||
readonly property int barOffsetRight: {
|
||||
if (barPos !== "right")
|
||||
return 0;
|
||||
const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0;
|
||||
return floatMarginH;
|
||||
return Style.barHeight + floatMarginH;
|
||||
}
|
||||
|
||||
// Anchoring
|
||||
|
||||
@@ -163,14 +163,14 @@ Item {
|
||||
if (barPos !== "left")
|
||||
return 0;
|
||||
const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0;
|
||||
return floatMarginH;
|
||||
return Style.barHeight + floatMarginH;
|
||||
}
|
||||
|
||||
readonly property int barOffsetRight: {
|
||||
if (barPos !== "right")
|
||||
return 0;
|
||||
const floatMarginH = isFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0;
|
||||
return floatMarginH;
|
||||
return Style.barHeight + floatMarginH;
|
||||
}
|
||||
|
||||
// Anchoring
|
||||
|
||||
@@ -8,6 +8,7 @@ Item {
|
||||
property int strokeWidth: 0
|
||||
property var values: []
|
||||
property bool vertical: false
|
||||
property string barPosition: "top" // "top", "bottom", "left", "right"
|
||||
|
||||
// Minimum signal properties
|
||||
property bool showMinimumSignal: false
|
||||
@@ -40,7 +41,7 @@ Item {
|
||||
// Only update when value actually changes - reduces GPU load
|
||||
width: vertical ? root.width * amp : root.barSlotSize * 0.5
|
||||
height: vertical ? root.barSlotSize * 0.5 : root.height * amp
|
||||
x: vertical ? root.width - width : index * root.barSlotSize + (root.barSlotSize * 0.25)
|
||||
x: vertical ? (root.barPosition === "left" ? 0 : root.width - width) : index * root.barSlotSize + (root.barSlotSize * 0.25)
|
||||
y: vertical ? index * root.barSlotSize + (root.barSlotSize * 0.25) : root.height - height
|
||||
|
||||
// Disable updates when invisible to save GPU
|
||||
|
||||
Reference in New Issue
Block a user