1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

dankbar: allow disabling title scrolling in the music display (#882)

This commit is contained in:
Marcus Ramberg
2025-12-02 19:39:19 +01:00
committed by GitHub
parent 69a5566bf9
commit 1617a7f2c1
4 changed files with 12 additions and 1 deletions

View File

@@ -168,6 +168,7 @@ Singleton {
property bool dwlShowAllTags: false
property var workspaceNameIcons: ({})
property bool waveProgressEnabled: true
property bool scrollTitleEnabled: true
property bool clockCompactMode: false
property bool focusedWindowCompactMode: false
property bool runningAppsCompactMode: true

View File

@@ -83,6 +83,7 @@ var SPEC = {
dwlShowAllTags: { def: false },
workspaceNameIcons: { def: {} },
waveProgressEnabled: { def: true },
scrollTitleEnabled: {def: true},
clockCompactMode: { def: false },
focusedWindowCompactMode: { def: false },
runningAppsCompactMode: { def: true },

View File

@@ -232,7 +232,7 @@ BasePill {
StyledText {
id: mediaText
property bool needsScrolling: implicitWidth > textContainer.width
property bool needsScrolling: implicitWidth > textContainer.width && SettingsData.scrollTitleEnabled
property real scrollOffset: 0
anchors.verticalCenter: parent.verticalCenter

View File

@@ -203,6 +203,15 @@ Item {
return SettingsData.set("waveProgressEnabled", checked);
}
}
DankToggle {
width: parent.width
text: I18n.tr("Scroll song title")
description: I18n.tr("Scroll title if it doesn't fit in widget")
checked: SettingsData.scrollTitleEnabled
onToggled: checked => {
return SettingsData.set("scrollTitleEnabled", checked);
}
}
}
}