feat: add date + calendar, also tidy up pointers/tooltips
This commit is contained in:
parent
bc1f4a385e
commit
435ecf8d4b
19 changed files with 595 additions and 208 deletions
36
Components/IconButton.qml
Normal file
36
Components/IconButton.qml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import qs.Settings
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
property string icon
|
||||
property bool enabled: true
|
||||
property bool hovering: false
|
||||
property real size: 32
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
implicitWidth: size
|
||||
implicitHeight: size
|
||||
|
||||
hoverEnabled: true
|
||||
onEntered: hovering = true
|
||||
onExited: hovering = false
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 8
|
||||
color: root.hovering ? Theme.accentPrimary : "transparent"
|
||||
}
|
||||
Text {
|
||||
id: iconText
|
||||
anchors.centerIn: parent
|
||||
text: root.icon
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 24
|
||||
color: root.hovering ? Theme.onAccent : Theme.textPrimary
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
opacity: root.enabled ? 1.0 : 0.5
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue