background: some fixes for desktop clock
Loader + use implicit width/height + move
This commit is contained in:
parent
3e3e98b340
commit
6616cb1327
2 changed files with 14 additions and 11 deletions
|
|
@ -2,6 +2,7 @@ import qs.widgets
|
||||||
import qs.config
|
import qs.config
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
|
import QtQuick
|
||||||
|
|
||||||
LazyLoader {
|
LazyLoader {
|
||||||
activeAsync: Config.background.enabled
|
activeAsync: Config.background.enabled
|
||||||
|
|
@ -27,11 +28,15 @@ LazyLoader {
|
||||||
|
|
||||||
Wallpaper {}
|
Wallpaper {}
|
||||||
|
|
||||||
DesktopClock {
|
Loader {
|
||||||
visible: Config.background.desktopClock.enabled
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: Appearance.padding.large
|
anchors.margins: Appearance.padding.large
|
||||||
|
|
||||||
|
active: Config.background.desktopClock.enabled
|
||||||
|
asynchronous: true
|
||||||
|
|
||||||
|
source: "DesktopClock.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,18 @@
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Controls
|
|
||||||
import qs.config
|
|
||||||
import qs.services
|
|
||||||
import qs.widgets
|
import qs.widgets
|
||||||
|
import qs.services
|
||||||
|
import qs.config
|
||||||
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: clockRoot
|
implicitWidth: timeText.implicitWidth + Appearance.padding.large * 2
|
||||||
width: timeText.implicitWidth + Appearance.padding.large * 2
|
implicitHeight: timeText.implicitHeight + Appearance.padding.large * 2
|
||||||
height: timeText.implicitHeight + Appearance.padding.large * 2
|
|
||||||
|
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: timeText
|
id: timeText
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
text: Time.format("hh:mm:ss")
|
||||||
font.pointSize: Appearance.font.size.extraLarge
|
font.pointSize: Appearance.font.size.extraLarge
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: Time.format("hh:mm:ss");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue