diff --git a/widgets/StyledListView.qml b/components/StyledListView.qml similarity index 66% rename from widgets/StyledListView.qml rename to components/StyledListView.qml index 6f937df..733d258 100644 --- a/widgets/StyledListView.qml +++ b/components/StyledListView.qml @@ -1,10 +1,16 @@ import QtQuick +import QtQuick.Controls ListView { id: root + clip: true maximumFlickVelocity: 3000 + ScrollBar { + orientation: root.orientation == ListView.Vertical ? Qt.Vertical : Qt.Horizontal + } + rebound: Transition { NumberAnimation { properties: "x,y" diff --git a/modules/launcher/AppList.qml b/modules/launcher/AppList.qml index 471f020..d8dbe22 100644 --- a/modules/launcher/AppList.qml +++ b/modules/launcher/AppList.qml @@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound import "items" import "services" +import qs.components import qs.config import qs.widgets import Quickshell @@ -21,7 +22,7 @@ StyledListView { onValuesChanged: root.currentIndex = 0 values: Apps.query(search.text) - } + } spacing: 12 @@ -45,7 +46,7 @@ StyledListView { id: appItem AppItem { - active: ListView.isCurrentItem + active: ListView.isCurrentItem } } } diff --git a/modules/storybook/Storybook.qml b/modules/storybook/Storybook.qml index 4f5d66a..7163db9 100644 --- a/modules/storybook/Storybook.qml +++ b/modules/storybook/Storybook.qml @@ -1,9 +1,10 @@ pragma ComponentBehavior: Bound +import qs.widgets import qs.components +import qs.config import qs.constants import qs.services -import qs.widgets import Quickshell.Hyprland import Quickshell.Wayland import QtQuick @@ -98,7 +99,7 @@ StyledWindow { ColumnLayout { StyledText { - text: "Progress Bar" + text: "ProgressBar" font.pixelSize: 18 } StyledProgressBar { @@ -111,6 +112,25 @@ StyledWindow { } } + ColumnLayout { + StyledText { + text: "ListView" + font.pixelSize: 18 + } + StyledWrapperRectangle { + border.color: Theme.palette.base100 + border.width: 2 + StyledListView { + implicitWidth: 200 + implicitHeight: 100 + model: 10 + delegate: StyledText { + text: "Hello world!" + } + } + } + } + ColumnLayout { StyledText { text: "Mpris Player Selector"