summaryrefslogtreecommitdiff
path: root/widgets/PaddedRect.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 10:53:54 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 10:53:54 +1000
commit01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a (patch)
tree23b0bd7eeedcef0cede66b38426d9e8ba1a04af1 /widgets/PaddedRect.qml
parentrefactor: use anchors instead of layouts (diff)
downloadcaelestia-shell-01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a.tar.gz
caelestia-shell-01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a.tar.bz2
caelestia-shell-01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a.zip
bar: fix alignment
Also refactor box -> styledrect + paddedrect
Diffstat (limited to '')
-rw-r--r--widgets/PaddedRect.qml (renamed from widgets/Box.qml)36
1 files changed, 1 insertions, 35 deletions
diff --git a/widgets/Box.qml b/widgets/PaddedRect.qml
index d93fb69..382360d 100644
--- a/widgets/Box.qml
+++ b/widgets/PaddedRect.qml
@@ -1,13 +1,9 @@
import "root:/config"
import QtQuick
-Rectangle {
+StyledRect {
id: root
- property bool vertical: false
- property bool homogenous: false
- property bool animated: false
- property int spacing: Appearance.spacing.small
property var padding: 0
readonly property int paddingTop: getRealPadding().top
@@ -44,8 +40,6 @@ Rectangle {
return pad;
}
- color: "transparent"
-
implicitWidth: childrenRect.width + paddingX
implicitHeight: childrenRect.height + paddingY
@@ -55,32 +49,4 @@ Rectangle {
child.y = Qt.binding(() => paddingTop);
}
}
-
- Behavior on color {
- ColorAnimation {
- duration: Appearance.anim.durations.normal
- easing.type: Easing.BezierSpline
- easing.bezierCurve: Appearance.anim.curves.standard
- }
- }
-
- Behavior on implicitWidth {
- enabled: root.animated
-
- NumberAnimation {
- duration: Appearance.anim.durations.normal
- easing.type: Easing.BezierSpline
- easing.bezierCurve: Appearance.anim.curves.emphasized
- }
- }
-
- Behavior on implicitHeight {
- enabled: root.animated
-
- NumberAnimation {
- duration: Appearance.anim.durations.normal
- easing.type: Easing.BezierSpline
- easing.bezierCurve: Appearance.anim.curves.emphasized
- }
- }
}