summaryrefslogtreecommitdiff
path: root/components/controls/IconButton.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-14 17:31:01 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-14 17:31:01 +1000
commit281b04b6d99c060571788478dd3679f1c1dc5cd8 (patch)
tree7bc7b07e80cb3fe946f7ff3cc9ca934c5c8f843c /components/controls/IconButton.qml
parentutilities: add recording control (diff)
downloadcaelestia-shell-281b04b6d99c060571788478dd3679f1c1dc5cd8.tar.gz
caelestia-shell-281b04b6d99c060571788478dd3679f1c1dc5cd8.tar.bz2
caelestia-shell-281b04b6d99c060571788478dd3679f1c1dc5cd8.zip
utilities: add recording delete confirmation
Diffstat (limited to '')
-rw-r--r--components/controls/IconButton.qml7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/controls/IconButton.qml b/components/controls/IconButton.qml
index 7eadcc3..0b39d97 100644
--- a/components/controls/IconButton.qml
+++ b/components/controls/IconButton.qml
@@ -12,13 +12,14 @@ StyledRect {
Text
}
- required property string icon
+ property alias icon: label.text
property bool checked
property bool toggle
property real padding: type == IconButton.Text ? Appearance.padding.small / 2 : Appearance.padding.smaller
property alias font: label.font
property int type: IconButton.Filled
+ property alias stateLayer: stateLayer
property alias label: label
property bool internalChecked
@@ -39,6 +40,8 @@ StyledRect {
implicitHeight: label.implicitHeight + padding * 2
StateLayer {
+ id: stateLayer
+
color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
function onClicked(): void {
@@ -52,8 +55,6 @@ StyledRect {
id: label
anchors.centerIn: parent
-
- text: root.icon
color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
fill: root.internalChecked ? 1 : 0