From c277bc6938d5ee10257885835562c20f6c72e94d Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Sat, 30 Aug 2025 00:13:43 -0400 Subject: [PATCH] styled wrapper rectangle --- components/StyledWrapperRectangle.qml | 7 +++++++ modules/bar/components/bluetooth/BluetoothMenu.qml | 10 +++------- .../components/notifications/NotificationMenu.qml | 13 ++++--------- modules/drawers/dashboard/Dashboard.qml | 6 +----- modules/launcher/Launcher.qml | 10 +++------- modules/pomodoro/Pomodoro.qml | 5 +---- modules/powermenu/PowerMenu.qml | 4 ++-- modules/storybook/Storybook.qml | 8 ++------ 8 files changed, 23 insertions(+), 40 deletions(-) create mode 100644 components/StyledWrapperRectangle.qml diff --git a/components/StyledWrapperRectangle.qml b/components/StyledWrapperRectangle.qml new file mode 100644 index 0000000..d81b5c2 --- /dev/null +++ b/components/StyledWrapperRectangle.qml @@ -0,0 +1,7 @@ +import qs.config +import Quickshell.Widgets + +WrapperRectangle { + color: Theme.palette.base300 + radius: 8 +} diff --git a/modules/bar/components/bluetooth/BluetoothMenu.qml b/modules/bar/components/bluetooth/BluetoothMenu.qml index 22d1899..72481f8 100644 --- a/modules/bar/components/bluetooth/BluetoothMenu.qml +++ b/modules/bar/components/bluetooth/BluetoothMenu.qml @@ -1,5 +1,6 @@ pragma ComponentBehavior: Bound +import qs.components import qs.config import qs.widgets import QtQuick @@ -7,7 +8,6 @@ import QtQuick.Controls import QtQuick.Layouts import Quickshell import Quickshell.Bluetooth -import Quickshell.Widgets StyledPopupWindow { id: root @@ -18,10 +18,8 @@ StyledPopupWindow { content: ColumnLayout { spacing: 8 - WrapperRectangle { + StyledWrapperRectangle { margin: 16 - color: Theme.palette.base200 - radius: 8 Layout.fillWidth: true RowLayout { RowLayout { @@ -51,10 +49,8 @@ StyledPopupWindow { } } - WrapperRectangle { + StyledWrapperRectangle { margin: 16 - color: Theme.palette.base200 - radius: 8 ColumnLayout { spacing: 8 diff --git a/modules/bar/components/notifications/NotificationMenu.qml b/modules/bar/components/notifications/NotificationMenu.qml index 16ca99e..35f9c19 100644 --- a/modules/bar/components/notifications/NotificationMenu.qml +++ b/modules/bar/components/notifications/NotificationMenu.qml @@ -7,7 +7,6 @@ import qs.widgets import QtQuick import QtQuick.Controls import QtQuick.Layouts -import Quickshell.Widgets StyledPopupWindow { id: root @@ -48,14 +47,10 @@ StyledPopupWindow { implicitWidth: 300 clip: true - header: WrapperRectangle { - margin: 8 - color: 'transparent' - StyledText { - text: "Notifications" - font.bold: true - font.pixelSize: 16 - } + header: StyledText { + text: "Notifications" + font.bold: true + font.pixelSize: 16 } model: Notifications.list delegate: NotificationItem {} diff --git a/modules/drawers/dashboard/Dashboard.qml b/modules/drawers/dashboard/Dashboard.qml index 467bda1..6bbaafe 100644 --- a/modules/drawers/dashboard/Dashboard.qml +++ b/modules/drawers/dashboard/Dashboard.qml @@ -1,22 +1,18 @@ pragma ComponentBehavior: Bound import qs.components -import qs.config import qs.constants import qs.services import qs.widgets import QtQuick import QtQuick.Layouts -import Quickshell.Widgets StyledDrawer { id: root visible: Visibility.dashboard - WrapperRectangle { - color: Theme.palette.base200 - radius: 8 + StyledWrapperRectangle { margin: 32 ColumnLayout { spacing: 8 diff --git a/modules/launcher/Launcher.qml b/modules/launcher/Launcher.qml index 0d7f158..36d65ab 100644 --- a/modules/launcher/Launcher.qml +++ b/modules/launcher/Launcher.qml @@ -1,13 +1,13 @@ pragma ComponentBehavior: Bound import "services" +import qs.components import qs.config import qs.constants import qs.services import qs.widgets import Quickshell.Hyprland import Quickshell.Wayland -import Quickshell.Widgets import QtQuick import QtQuick.Layouts @@ -36,22 +36,18 @@ StyledWindow { search.clear(); } - WrapperRectangle { + StyledWrapperRectangle { id: rect - color: Theme.palette.base300 margin: 18 - radius: 8 ColumnLayout { - WrapperRectangle { + StyledWrapperRectangle { id: searchWrapper Layout.fillWidth: true Layout.alignment: Qt.AlignTop - color: Theme.palette.base200 margin: 4 - radius: 8 RowLayout { LucideIcon { diff --git a/modules/pomodoro/Pomodoro.qml b/modules/pomodoro/Pomodoro.qml index d14077e..9d970d8 100644 --- a/modules/pomodoro/Pomodoro.qml +++ b/modules/pomodoro/Pomodoro.qml @@ -7,7 +7,6 @@ import qs.services import qs.widgets import Quickshell.Hyprland import Quickshell.Wayland -import Quickshell.Widgets import QtQuick import QtQuick.Layouts @@ -22,15 +21,13 @@ StyledWindow { WlrLayershell.layer: WlrLayer.Top WlrLayershell.keyboardFocus: root.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None - WrapperRectangle { + StyledWrapperRectangle { id: rect - color: Theme.palette.base300 leftMargin: 48 rightMargin: 48 topMargin: 24 bottomMargin: 24 - radius: 8 HyprlandFocusGrab { active: Visibility.pomodoro diff --git a/modules/powermenu/PowerMenu.qml b/modules/powermenu/PowerMenu.qml index 69b423b..cea98f8 100644 --- a/modules/powermenu/PowerMenu.qml +++ b/modules/powermenu/PowerMenu.qml @@ -1,12 +1,12 @@ pragma ComponentBehavior: Bound +import qs.components import qs.config import qs.services import qs.widgets import Quickshell.Hyprland import Quickshell.Io import Quickshell.Wayland -import Quickshell.Widgets import QtQuick import QtQuick.Layouts @@ -25,7 +25,7 @@ StyledWindow { id: process } - WrapperRectangle { + StyledWrapperRectangle { id: rect color: Theme.palette.base300 diff --git a/modules/storybook/Storybook.qml b/modules/storybook/Storybook.qml index 7603c6d..ad28b87 100644 --- a/modules/storybook/Storybook.qml +++ b/modules/storybook/Storybook.qml @@ -1,13 +1,11 @@ pragma ComponentBehavior: Bound import qs.components -import qs.config import qs.constants import qs.services import qs.widgets import Quickshell.Hyprland import Quickshell.Wayland -import Quickshell.Widgets import QtQuick import QtQuick.Controls import QtQuick.Layouts @@ -23,12 +21,10 @@ StyledWindow { WlrLayershell.layer: WlrLayer.Top WlrLayershell.keyboardFocus: root.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None - WrapperRectangle { + StyledWrapperRectangle { id: rect - color: Theme.palette.base300 margin: 48 - radius: 8 HyprlandFocusGrab { active: Visibility.storybook @@ -53,7 +49,7 @@ StyledWindow { ColumnLayout { StyledText { - text: "Switch" + text: "Icon Button" font.pixelSize: 18 } StyledIconButton {