summaryrefslogtreecommitdiff
path: root/modules/launcher/Content.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 20:33:23 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 20:33:23 +1000
commit37c357ee5ae9b72fa4678e345bf8a2e7dd219321 (patch)
tree7a958fdebe69936654f954f5850684616a885d34 /modules/launcher/Content.qml
parentlauncher: fuzzy sort (diff)
downloadcaelestia-shell-37c357ee5ae9b72fa4678e345bf8a2e7dd219321.tar.gz
caelestia-shell-37c357ee5ae9b72fa4678e345bf8a2e7dd219321.tar.bz2
caelestia-shell-37c357ee5ae9b72fa4678e345bf8a2e7dd219321.zip
launcher: add scrollbar
Also fix height
Diffstat (limited to 'modules/launcher/Content.qml')
-rw-r--r--modules/launcher/Content.qml31
1 files changed, 23 insertions, 8 deletions
diff --git a/modules/launcher/Content.qml b/modules/launcher/Content.qml
index bce3d61..edbc605 100644
--- a/modules/launcher/Content.qml
+++ b/modules/launcher/Content.qml
@@ -3,28 +3,32 @@ import "root:/services"
import "root:/config"
import Quickshell
import QtQuick
+import QtQuick.Controls
Item {
id: root
required property Scope launcher
+ readonly property int padding: Appearance.padding.large
+ readonly property int spacing: Appearance.spacing.normal
+ readonly property int rounding: Appearance.rounding.large
implicitWidth: LauncherConfig.sizes.width
- implicitHeight: search.height + list.height + Appearance.padding.large * 5 // Don't question it
+ implicitHeight: search.height + list.height + padding * 4 + spacing
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
StyledRect {
color: Appearance.alpha(Appearance.colours.m3surfaceContainerHigh, true)
- radius: Appearance.rounding.large
- implicitHeight: list.height + Appearance.padding.large * 2
+ radius: root.rounding
+ implicitHeight: list.height + root.padding * 2
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: search.top
- anchors.bottomMargin: Appearance.spacing.normal
- anchors.margins: Appearance.padding.large
+ anchors.bottomMargin: root.spacing
+ anchors.margins: root.padding
ListView {
id: list
@@ -42,10 +46,21 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
- anchors.margins: Appearance.padding.large
+ anchors.margins: root.padding
delegate: AppItem {}
+ ScrollBar.vertical: StyledScrollBar {
+ // Move half out
+ parent: list.parent
+ anchors.top: list.top
+ anchors.bottom: list.bottom
+ anchors.right: list.right
+ anchors.topMargin: root.padding / 2
+ anchors.bottomMargin: root.padding / 2
+ anchors.rightMargin: -root.padding / 2
+ }
+
add: Transition {
Anim {
properties: "opacity,scale"
@@ -93,13 +108,13 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
- anchors.margins: Appearance.padding.large
+ anchors.margins: root.padding
placeholderText: qsTr("Type \">\" for commands")
background: StyledRect {
color: Appearance.alpha(Appearance.colours.m3surfaceContainerHigh, true)
- radius: Appearance.rounding.large
+ radius: root.rounding
}
onAccepted: {