fixup all the shit and properly add icontheme
This commit is contained in:
parent
a347cbcedb
commit
c02b7e5d5d
5 changed files with 34 additions and 7 deletions
|
|
@ -1,19 +1,45 @@
|
|||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import qs
|
||||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
BarComponent {
|
||||
id: root
|
||||
implicitWidth: clockText.width + 16
|
||||
implicitWidth: clockLayout.width + 16
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
StyledText {
|
||||
active: clickHandler.containsMouse
|
||||
RowLayout {
|
||||
id: clockLayout
|
||||
anchors.centerIn: parent
|
||||
id: clockText
|
||||
text: Qt.formatDateTime(clock.date, "d.M.yy - hh:mm:ss")
|
||||
IconImage {
|
||||
source: Quickshell.iconPath("clock-applet-symbolic")
|
||||
implicitSize: Config.iconSize
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
colorization: 1.0
|
||||
colorizationColor: Colors.text
|
||||
brightness: 0.5
|
||||
}
|
||||
}
|
||||
StyledText {
|
||||
id: clockText
|
||||
text: Qt.formatDateTime(clock.date, toggleFormat ? "hh:mm:ss | dd.mm.yy" : "hh:mm:ss")
|
||||
property bool toggleFormat: false
|
||||
}
|
||||
|
||||
}
|
||||
MouseArea {
|
||||
id: clickHandler
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onClicked: { clockText.toggleFormat = !clockText.toggleFormat }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//@ pragma IconTheme Adwaita
|
||||
pragma ComponentBehavior: Bound
|
||||
import Quickshell.Services.Pipewire
|
||||
import Quickshell.Io
|
||||
|
|
|
|||
Loading…
Reference in a new issue