From f04ac180f0c8058e1c0c66aa55c5bbc76636c611 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Fri, 5 Sep 2025 14:13:05 -0400 Subject: [PATCH] NInputAction: use proper label/description + autoformatting --- Modules/Bar/Widgets/Microphone.qml | 2 +- Modules/Bar/Widgets/Volume.qml | 6 +++--- Widgets/NInputAction.qml | 20 ++------------------ Widgets/NPill.qml | 3 +-- 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/Modules/Bar/Widgets/Microphone.qml b/Modules/Bar/Widgets/Microphone.qml index 410e041..f4e1c1a 100644 --- a/Modules/Bar/Widgets/Microphone.qml +++ b/Modules/Bar/Widgets/Microphone.qml @@ -100,7 +100,7 @@ Item { AudioService.setInputMuted(!AudioService.inputMuted) } onMiddleClicked: { - Quickshell.execDetached(["pwvucontrol"]); + Quickshell.execDetached(["pwvucontrol"]) } } } diff --git a/Modules/Bar/Widgets/Volume.qml b/Modules/Bar/Widgets/Volume.qml index 5f70998..84f8b22 100644 --- a/Modules/Bar/Widgets/Volume.qml +++ b/Modules/Bar/Widgets/Volume.qml @@ -63,8 +63,8 @@ Item { collapsedIconColor: Color.mOnSurface autoHide: false // Important to be false so we can hover as long as we want text: Math.floor(AudioService.volume * 100) + "%" - tooltipText: "Volume: " + Math.round( - AudioService.volume * 100) + "%\nLeft click for advanced settings.\nScroll up/down to change volume.\nRight click to toggle mute." + tooltipText: "Volume: " + Math.round(AudioService.volume * 100) + + "%\nLeft click for advanced settings.\nScroll up/down to change volume.\nRight click to toggle mute." onWheel: function (delta) { wheelAccumulator += delta @@ -85,7 +85,7 @@ Item { AudioService.setMuted(!AudioService.muted) } onMiddleClicked: { - Quickshell.execDetached(["pwvucontrol"]); + Quickshell.execDetached(["pwvucontrol"]) } } } diff --git a/Widgets/NInputAction.qml b/Widgets/NInputAction.qml index 1f8ce5e..d439551 100644 --- a/Widgets/NInputAction.qml +++ b/Widgets/NInputAction.qml @@ -22,24 +22,6 @@ ColumnLayout { // Internal properties property real scaling: 1.0 - // Label - NText { - text: root.label - font.pointSize: Style.fontSizeL * scaling - font.weight: Style.fontWeightBold - color: Color.mOnSurface - Layout.fillWidth: true - } - - // Description - NText { - text: root.description - font.pointSize: Style.fontSizeS * scaling - color: Color.mOnSurfaceVariant - wrapMode: Text.Wrap - Layout.fillWidth: true - } - // Input and button row RowLayout { spacing: Style.marginM * scaling @@ -47,6 +29,8 @@ ColumnLayout { NTextInput { id: textInput + label: root.label + description: root.description placeholderText: root.placeholderText text: root.text onEditingFinished: { diff --git a/Widgets/NPill.qml b/Widgets/NPill.qml index 1fcccfc..2432544 100644 --- a/Widgets/NPill.qml +++ b/Widgets/NPill.qml @@ -231,8 +231,7 @@ Item { root.clicked() } else if (mouse.button === Qt.RightButton) { root.rightClicked() - } - else if (mouse.button === Qt.MiddleButton) { + } else if (mouse.button === Qt.MiddleButton) { root.middleClicked() } }