feat(ui): add hide separator setting

This commit is contained in:
2026-05-30 11:59:43 +00:00
parent de22c05c33
commit c26793dfe2
4 changed files with 18 additions and 1 deletions
+4
View File
@@ -90,5 +90,9 @@ PLAYING]]></default>
<label>Separator height percent</label> <label>Separator height percent</label>
<default>90</default> <default>90</default>
</entry> </entry>
<entry name="hideSeparator" type="Bool">
<label>Hide separator</label>
<default>false</default>
</entry>
</group> </group>
</kcfg> </kcfg>
+2 -1
View File
@@ -28,6 +28,7 @@ MouseArea {
property int configuredSeparatorGapLabel: 4 property int configuredSeparatorGapLabel: 4
property int configuredSeparatorGapTrack: 4 property int configuredSeparatorGapTrack: 4
property int configuredSeparatorHeight: 90 property int configuredSeparatorHeight: 90
property bool configuredHideSeparator: false
readonly property double buttonSize: 16 readonly property double buttonSize: 16
readonly property string effectiveLabelVisibilityMode: configuredLabelVisibilityMode === "always" || configuredLabelVisibilityMode === "never" ? configuredLabelVisibilityMode : "auto" readonly property string effectiveLabelVisibilityMode: configuredLabelVisibilityMode === "always" || configuredLabelVisibilityMode === "never" ? configuredLabelVisibilityMode : "auto"
readonly property bool labelsOnRight: configuredLabelPlacement === "right" readonly property bool labelsOnRight: configuredLabelPlacement === "right"
@@ -322,7 +323,7 @@ MouseArea {
Item { Item {
id: separatorContainer id: separatorContainer
visible: mediaControlsMouseArea.nowPlayingLabelsVisible && !mediaControlsMouseArea.hideNowPlayingArea visible: mediaControlsMouseArea.nowPlayingLabelsVisible && !mediaControlsMouseArea.hideNowPlayingArea && !mediaControlsMouseArea.configuredHideSeparator
Layout.fillHeight: true Layout.fillHeight: true
Layout.leftMargin: visible ? mediaControlsMouseArea.effectiveSeparatorGapLabel : 0 Layout.leftMargin: visible ? mediaControlsMouseArea.effectiveSeparatorGapLabel : 0
Layout.rightMargin: visible ? mediaControlsMouseArea.effectiveSeparatorGapTrack : 0 Layout.rightMargin: visible ? mediaControlsMouseArea.effectiveSeparatorGapTrack : 0
+8
View File
@@ -29,6 +29,7 @@ KCM.SimpleKCM {
property alias cfg_separatorGapLabel: separatorGapLabelSpinBox.value property alias cfg_separatorGapLabel: separatorGapLabelSpinBox.value
property alias cfg_separatorGapTrack: separatorGapTrackSpinBox.value property alias cfg_separatorGapTrack: separatorGapTrackSpinBox.value
property alias cfg_separatorHeight: separatorHeightSpinBox.value property alias cfg_separatorHeight: separatorHeightSpinBox.value
property alias cfg_hideSeparator: hideSeparatorCheckBox.checked
readonly property var availableFonts: Qt.fontFamilies() readonly property var availableFonts: Qt.fontFamilies()
readonly property var labelVisibilityOptions: [{ readonly property var labelVisibilityOptions: [{
"text": i18n("Auto hide when idle"), "text": i18n("Auto hide when idle"),
@@ -198,6 +199,13 @@ KCM.SimpleKCM {
to: 100 to: 100
} }
QQC2.CheckBox {
id: hideSeparatorCheckBox
Kirigami.FormData.label: i18n("Separator:")
text: i18n("Hide separator")
}
SectionHeader { SectionHeader {
title: i18n("Label") title: i18n("Label")
} }
+4
View File
@@ -52,6 +52,8 @@ PlasmoidItem {
property int configuredSeparatorGapTrack: plasmoid.configuration.separatorGapTrack property int configuredSeparatorGapTrack: plasmoid.configuration.separatorGapTrack
// qmllint disable missing-property // qmllint disable missing-property
property int configuredSeparatorHeight: plasmoid.configuration.separatorHeight property int configuredSeparatorHeight: plasmoid.configuration.separatorHeight
// qmllint disable missing-property
property bool configuredHideSeparator: plasmoid.configuration.hideSeparator
readonly property int resolvedBackgroundHints: { readonly property int resolvedBackgroundHints: {
if (configuredBackgroundStyle === "default") if (configuredBackgroundStyle === "default")
return PlasmaCore.Types.DefaultBackground | PlasmaCore.Types.ConfigurableBackground; return PlasmaCore.Types.DefaultBackground | PlasmaCore.Types.ConfigurableBackground;
@@ -100,6 +102,7 @@ PlasmoidItem {
configuredSeparatorGapLabel: root.configuredSeparatorGapLabel configuredSeparatorGapLabel: root.configuredSeparatorGapLabel
configuredSeparatorGapTrack: root.configuredSeparatorGapTrack configuredSeparatorGapTrack: root.configuredSeparatorGapTrack
configuredSeparatorHeight: root.configuredSeparatorHeight configuredSeparatorHeight: root.configuredSeparatorHeight
configuredHideSeparator: root.configuredHideSeparator
} }
compactRepresentation: Representation { compactRepresentation: Representation {
@@ -129,6 +132,7 @@ PlasmoidItem {
configuredSeparatorGapLabel: root.configuredSeparatorGapLabel configuredSeparatorGapLabel: root.configuredSeparatorGapLabel
configuredSeparatorGapTrack: root.configuredSeparatorGapTrack configuredSeparatorGapTrack: root.configuredSeparatorGapTrack
configuredSeparatorHeight: root.configuredSeparatorHeight configuredSeparatorHeight: root.configuredSeparatorHeight
configuredHideSeparator: root.configuredHideSeparator
} }
} }