From c26793dfe200f3e93e39bda0b89656237a2ef0e1 Mon Sep 17 00:00:00 2001 From: ruinivist Date: Sat, 30 May 2026 11:59:43 +0000 Subject: [PATCH] feat(ui): add hide separator setting --- package/contents/config/main.xml | 4 ++++ package/contents/ui/Representation.qml | 3 ++- package/contents/ui/configGeneral.qml | 8 ++++++++ package/contents/ui/main.qml | 4 ++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml index fee3bfd..5b88d8e 100644 --- a/package/contents/config/main.xml +++ b/package/contents/config/main.xml @@ -90,5 +90,9 @@ PLAYING]]> 90 + + + false + diff --git a/package/contents/ui/Representation.qml b/package/contents/ui/Representation.qml index bc3f20d..2c151b5 100644 --- a/package/contents/ui/Representation.qml +++ b/package/contents/ui/Representation.qml @@ -28,6 +28,7 @@ MouseArea { property int configuredSeparatorGapLabel: 4 property int configuredSeparatorGapTrack: 4 property int configuredSeparatorHeight: 90 + property bool configuredHideSeparator: false readonly property double buttonSize: 16 readonly property string effectiveLabelVisibilityMode: configuredLabelVisibilityMode === "always" || configuredLabelVisibilityMode === "never" ? configuredLabelVisibilityMode : "auto" readonly property bool labelsOnRight: configuredLabelPlacement === "right" @@ -322,7 +323,7 @@ MouseArea { Item { id: separatorContainer - visible: mediaControlsMouseArea.nowPlayingLabelsVisible && !mediaControlsMouseArea.hideNowPlayingArea + visible: mediaControlsMouseArea.nowPlayingLabelsVisible && !mediaControlsMouseArea.hideNowPlayingArea && !mediaControlsMouseArea.configuredHideSeparator Layout.fillHeight: true Layout.leftMargin: visible ? mediaControlsMouseArea.effectiveSeparatorGapLabel : 0 Layout.rightMargin: visible ? mediaControlsMouseArea.effectiveSeparatorGapTrack : 0 diff --git a/package/contents/ui/configGeneral.qml b/package/contents/ui/configGeneral.qml index 529dbd8..e10ffaf 100644 --- a/package/contents/ui/configGeneral.qml +++ b/package/contents/ui/configGeneral.qml @@ -29,6 +29,7 @@ KCM.SimpleKCM { property alias cfg_separatorGapLabel: separatorGapLabelSpinBox.value property alias cfg_separatorGapTrack: separatorGapTrackSpinBox.value property alias cfg_separatorHeight: separatorHeightSpinBox.value + property alias cfg_hideSeparator: hideSeparatorCheckBox.checked readonly property var availableFonts: Qt.fontFamilies() readonly property var labelVisibilityOptions: [{ "text": i18n("Auto hide when idle"), @@ -198,6 +199,13 @@ KCM.SimpleKCM { to: 100 } + QQC2.CheckBox { + id: hideSeparatorCheckBox + + Kirigami.FormData.label: i18n("Separator:") + text: i18n("Hide separator") + } + SectionHeader { title: i18n("Label") } diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index aa8e7cd..7975088 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -52,6 +52,8 @@ PlasmoidItem { property int configuredSeparatorGapTrack: plasmoid.configuration.separatorGapTrack // qmllint disable missing-property property int configuredSeparatorHeight: plasmoid.configuration.separatorHeight + // qmllint disable missing-property + property bool configuredHideSeparator: plasmoid.configuration.hideSeparator readonly property int resolvedBackgroundHints: { if (configuredBackgroundStyle === "default") return PlasmaCore.Types.DefaultBackground | PlasmaCore.Types.ConfigurableBackground; @@ -100,6 +102,7 @@ PlasmoidItem { configuredSeparatorGapLabel: root.configuredSeparatorGapLabel configuredSeparatorGapTrack: root.configuredSeparatorGapTrack configuredSeparatorHeight: root.configuredSeparatorHeight + configuredHideSeparator: root.configuredHideSeparator } compactRepresentation: Representation { @@ -129,6 +132,7 @@ PlasmoidItem { configuredSeparatorGapLabel: root.configuredSeparatorGapLabel configuredSeparatorGapTrack: root.configuredSeparatorGapTrack configuredSeparatorHeight: root.configuredSeparatorHeight + configuredHideSeparator: root.configuredHideSeparator } }