summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-27 10:42:08 +0800
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-27 10:42:08 +0800
commit63da636144635e5aa6b7ff1a2d2eec2a1e35aafa (patch)
treecd5461058c7afedb2d17f474f13ee218759519ba /widgets
parentdrawers: dont use hyprland cursor pos (diff)
downloadcaelestia-shell-63da636144635e5aa6b7ff1a2d2eec2a1e35aafa.tar.gz
caelestia-shell-63da636144635e5aa6b7ff1a2d2eec2a1e35aafa.tar.bz2
caelestia-shell-63da636144635e5aa6b7ff1a2d2eec2a1e35aafa.zip
internal: bar only vertical
The bar can only be vertical Remove box, boxlayout and anchortext Add StyledClippingRect
Diffstat (limited to '')
-rw-r--r--widgets/AnchorText.qml17
-rw-r--r--widgets/Box.qml30
-rw-r--r--widgets/BoxLayout.qml16
-rw-r--r--widgets/StateLayer.qml10
-rw-r--r--widgets/StyledClippingRect.qml17
-rw-r--r--widgets/StyledRect.qml2
6 files changed, 18 insertions, 74 deletions
diff --git a/widgets/AnchorText.qml b/widgets/AnchorText.qml
deleted file mode 100644
index 03514dd..0000000
--- a/widgets/AnchorText.qml
+++ /dev/null
@@ -1,17 +0,0 @@
-import "root:/config"
-import QtQuick
-
-StyledText {
- id: root
-
- required property Item prevAnchor
- property bool vertical: parent.vertical ?? false
-
- anchors.left: vertical ? undefined : prevAnchor.right
- anchors.leftMargin: vertical ? 0 : Appearance.padding.smaller
- anchors.top: vertical ? prevAnchor.bottom : undefined
- anchors.topMargin: vertical ? Appearance.padding.smaller : 0
-
- anchors.horizontalCenter: vertical ? prevAnchor.horizontalCenter : undefined
- anchors.verticalCenter: vertical ? undefined : prevAnchor.verticalCenter
-}
diff --git a/widgets/Box.qml b/widgets/Box.qml
deleted file mode 100644
index 9c786c7..0000000
--- a/widgets/Box.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-import "root:/config"
-import QtQuick
-
-Grid {
- property bool vertical: parent.vertical ?? false // Propagate from parent
-
- flow: vertical ? Grid.TopToBottom : Grid.LeftToRight
- spacing: Appearance.spacing.small
-
- onVerticalChanged: {
- if (vertical) {
- rows = -1;
- columns = 1;
- } else {
- columns = -1;
- rows = 1;
- }
- }
-
- add: Transition {
- NumberAnimation {
- properties: "scale"
- from: 0
- to: 1
- duration: Appearance.anim.durations.normal
- easing.type: Easing.BezierSpline
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- }
-}
diff --git a/widgets/BoxLayout.qml b/widgets/BoxLayout.qml
deleted file mode 100644
index d000bda..0000000
--- a/widgets/BoxLayout.qml
+++ /dev/null
@@ -1,16 +0,0 @@
-import "root:/config"
-import QtQuick.Layouts
-
-GridLayout {
- property bool vertical: parent.vertical ?? false // Propagate from parent
- property bool homogenous: false
- property int spacing: Appearance.spacing.small
-
- flow: vertical ? GridLayout.TopToBottom : GridLayout.LeftToRight
- uniformCellWidths: homogenous || vertical
- uniformCellHeights: homogenous || !vertical
- rows: vertical ? -1 : 1
- columns: vertical ? 1 : -1
- rowSpacing: spacing
- columnSpacing: spacing
-}
diff --git a/widgets/StateLayer.qml b/widgets/StateLayer.qml
index 8f39341..1c8f947 100644
--- a/widgets/StateLayer.qml
+++ b/widgets/StateLayer.qml
@@ -3,7 +3,7 @@ import "root:/services"
import "root:/config"
import QtQuick
-Rectangle {
+StyledRect {
id: root
readonly property alias hovered: mouse.hovered
@@ -40,12 +40,4 @@ Rectangle {
easing.bezierCurve: Appearance.anim.curves.standard
}
}
-
- Behavior on color {
- ColorAnimation {
- duration: Appearance.anim.durations.normal
- easing.type: Easing.BezierSpline
- easing.bezierCurve: Appearance.anim.curves.standard
- }
- }
}
diff --git a/widgets/StyledClippingRect.qml b/widgets/StyledClippingRect.qml
new file mode 100644
index 0000000..477ce86
--- /dev/null
+++ b/widgets/StyledClippingRect.qml
@@ -0,0 +1,17 @@
+import "root:/config"
+import Quickshell.Widgets
+import QtQuick
+
+ClippingRectangle {
+ id: root
+
+ color: "transparent"
+
+ Behavior on color {
+ ColorAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.standard
+ }
+ }
+}
diff --git a/widgets/StyledRect.qml b/widgets/StyledRect.qml
index 8b3ac05..108e5e0 100644
--- a/widgets/StyledRect.qml
+++ b/widgets/StyledRect.qml
@@ -4,8 +4,6 @@ import QtQuick
Rectangle {
id: root
- property bool vertical: parent?.vertical ?? false // Convenience property for propagation to children
-
color: "transparent"
Behavior on color {