mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
Merge pull request #5 from Amadoabad/indexedWorkspaces
Added number indexing option for the workspace switcher
This commit is contained in:
@@ -489,6 +489,15 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsToggle {
|
||||
text: "Workspace Index Numbers"
|
||||
description: "Show workspace index numbers in the top bar workspace switcher"
|
||||
checked: Prefs.showWorkspaceIndex
|
||||
onToggled: (checked) => {
|
||||
return Prefs.setShowWorkspaceIndex(checked);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ Rectangle {
|
||||
property int sequentialNumber: index + 1
|
||||
|
||||
width: isActive ? Theme.spacingXL + Theme.spacingM : Theme.spacingL + Theme.spacingXS
|
||||
height: Theme.spacingM
|
||||
height: Theme.spacingL
|
||||
radius: height / 2
|
||||
color: isActive ? Theme.primary : isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.5) : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.3)
|
||||
|
||||
@@ -99,6 +99,16 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Only show index if enabled in preferences
|
||||
Text {
|
||||
visible: Prefs.showWorkspaceIndex
|
||||
anchors.centerIn: parent
|
||||
text: sequentialNumber
|
||||
color: Theme.surfaceText
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.bold: isActive
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: Theme.mediumDuration
|
||||
|
||||
Reference in New Issue
Block a user