forked from Shinonome/dots-hyprland
background: add padding for clock text in least busy region detection
This commit is contained in:
@@ -18,6 +18,8 @@ Variants {
|
|||||||
readonly property bool fixedClockPosition: Config.options.background.fixedClockPosition
|
readonly property bool fixedClockPosition: Config.options.background.fixedClockPosition
|
||||||
readonly property real fixedClockX: Config.options.background.clockX
|
readonly property real fixedClockX: Config.options.background.clockX
|
||||||
readonly property real fixedClockY: Config.options.background.clockY
|
readonly property real fixedClockY: Config.options.background.clockY
|
||||||
|
readonly property real clockSizePadding: 20
|
||||||
|
readonly property real screenSizePadding: 50
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
@@ -115,10 +117,10 @@ Variants {
|
|||||||
function updateClockPosition() {
|
function updateClockPosition() {
|
||||||
// Somehow all this manual setting is needed to make the proc correctly use the new values
|
// Somehow all this manual setting is needed to make the proc correctly use the new values
|
||||||
leastBusyRegionProc.path = bgRoot.wallpaperPath
|
leastBusyRegionProc.path = bgRoot.wallpaperPath
|
||||||
leastBusyRegionProc.contentWidth = clock.implicitWidth
|
leastBusyRegionProc.contentWidth = clock.implicitWidth + root.clockSizePadding * 2
|
||||||
leastBusyRegionProc.contentHeight = clock.implicitHeight
|
leastBusyRegionProc.contentHeight = clock.implicitHeight + root.clockSizePadding * 2
|
||||||
leastBusyRegionProc.horizontalPadding = bgRoot.movableXSpace + 100
|
leastBusyRegionProc.horizontalPadding = bgRoot.movableXSpace + root.screenSizePadding * 2
|
||||||
leastBusyRegionProc.verticalPadding = bgRoot.movableYSpace + 100
|
leastBusyRegionProc.verticalPadding = bgRoot.movableYSpace + root.screenSizePadding * 2
|
||||||
leastBusyRegionProc.running = false;
|
leastBusyRegionProc.running = false;
|
||||||
leastBusyRegionProc.running = true;
|
leastBusyRegionProc.running = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user