diff --git a/Modules/Bar/WiFi.qml b/Modules/Bar/WiFi.qml index e768aa0..059736f 100644 --- a/Modules/Bar/WiFi.qml +++ b/Modules/Bar/WiFi.qml @@ -11,8 +11,8 @@ NIconButton { readonly property real scaling: Scaling.scale(screen) readonly property bool wifiEnabled: Settings.data.network.wifiEnabled - sizeMultiplier: 0.8 - showBorder: false + sizeMultiplier: 0.8 + showBorder: false icon: { let connected = false for (const net in network.networks) { diff --git a/Modules/DemoPanel/DemoPanel.qml b/Modules/DemoPanel/DemoPanel.qml index 66b55fc..634ebda 100644 --- a/Modules/DemoPanel/DemoPanel.qml +++ b/Modules/DemoPanel/DemoPanel.qml @@ -168,19 +168,17 @@ NLoader { font.weight: Style.fontWeightBold } - NTextInput { + NTextInput { text: "Type anything" Layout.fillWidth: true - onEditingFinished: function () { - } + onEditingFinished: function () {} - NDivider { - Layout.fillWidth: true + NDivider { + Layout.fillWidth: true + } } } - } - // NBusyIndicator ColumnLayout { spacing: Style.marginMedium * scaling diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 0cf6017..7adaf9c 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -185,7 +185,7 @@ PanelWindow { } NIconButton { - sizeMultiplier: 0.8 + sizeMultiplier: 0.8 showBorder: false anchors.top: parent.top anchors.right: parent.right diff --git a/Modules/SidePanel/Cards/PowerProfileCard.qml b/Modules/SidePanel/Cards/PowerProfileCard.qml new file mode 100644 index 0000000..6fd612d --- /dev/null +++ b/Modules/SidePanel/Cards/PowerProfileCard.qml @@ -0,0 +1,40 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Quickshell +import qs.Services +import qs.Widgets + +// Power Profiles: performance, balanced, eco +NBox { + Layout.fillWidth: true + Layout.preferredWidth: 1 + implicitHeight: powerRow.implicitHeight + Style.marginMedium * 2 * scaling + RowLayout { + id: powerRow + anchors.fill: parent + anchors.margins: Style.marginSmall * scaling + spacing: sidePanel.cardSpacing + Item { + Layout.fillWidth: true + } + // Performance + NIconButton { + icon: "speed" + onClicked: function () {/* TODO: hook to power profile */ } + } + // Balanced + NIconButton { + icon: "balance" + onClicked: function () {/* TODO: hook to power profile */ } + } + // Eco + NIconButton { + icon: "eco" + onClicked: function () {/* TODO: hook to power profile */ } + } + Item { + Layout.fillWidth: true + } + } +} diff --git a/Modules/SidePanel/Cards/UtilitiesCard.qml b/Modules/SidePanel/Cards/UtilitiesCard.qml new file mode 100644 index 0000000..6800432 --- /dev/null +++ b/Modules/SidePanel/Cards/UtilitiesCard.qml @@ -0,0 +1,34 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Quickshell +import qs.Services +import qs.Widgets + +// Utilities: record & wallpaper + NBox { + Layout.fillWidth: true + Layout.preferredWidth: 1 + implicitHeight: utilRow.implicitHeight + Style.marginMedium * 2 * scaling + RowLayout { + id: utilRow + anchors.fill: parent + anchors.margins: Style.marginSmall * scaling + spacing: sidePanel.cardSpacing + Item { + Layout.fillWidth: true + } + // Record + NIconButton { + icon: "fiber_manual_record" + } + // Wallpaper + NIconButton { + icon: "image" + } + Item { + Layout.fillWidth: true + } + } + } + \ No newline at end of file diff --git a/Modules/SidePanel/SidePanel.qml b/Modules/SidePanel/SidePanel.qml index 092c700..70a6eff 100644 --- a/Modules/SidePanel/SidePanel.qml +++ b/Modules/SidePanel/SidePanel.qml @@ -2,7 +2,6 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import Quickshell -import Quickshell.Wayland import qs.Modules.SidePanel.Cards import qs.Services import qs.Widgets @@ -123,66 +122,10 @@ NLoader { Layout.bottomMargin: 0 spacing: sidePanel.cardSpacing - // Power Profiles: performance, balanced, eco - NBox { - Layout.fillWidth: true - Layout.preferredWidth: 1 - implicitHeight: powerRow.implicitHeight + Style.marginSmall * 2 * scaling - RowLayout { - id: powerRow - anchors.fill: parent - anchors.margins: Style.marginSmall * scaling - spacing: sidePanel.cardSpacing - Item { - Layout.fillWidth: true - } - // Performance - NIconButton { - icon: "speed" - onClicked: function () {/* TODO: hook to power profile */ } - } - // Balanced - NIconButton { - icon: "balance" - onClicked: function () {/* TODO: hook to power profile */ } - } - // Eco - NIconButton { - icon: "eco" - onClicked: function () {/* TODO: hook to power profile */ } - } - Item { - Layout.fillWidth: true - } - } - } + PowerProfileCard {} + + UtilitiesCard {} - // Utilities: record & wallpaper - NBox { - Layout.fillWidth: true - Layout.preferredWidth: 1 - implicitHeight: utilRow.implicitHeight + Style.marginSmall * 2 * scaling - RowLayout { - id: utilRow - anchors.fill: parent - anchors.margins: Style.marginSmall * scaling - spacing: sidePanel.cardSpacing - Item { - Layout.fillWidth: true - } - // Record - NIconButton { - icon: "fiber_manual_record" - } - // Wallpaper - NIconButton { - icon: "image" - } - Item { - Layout.fillWidth: true - } - } - } } } }