Dock: Settings
- Removed master toggle again, as we have it per display - moved autoHide setting into the dock section - conditional dock per display working
This commit is contained in:
parent
82e42ad5c2
commit
af20c7b9eb
4 changed files with 11 additions and 17 deletions
|
|
@ -18,6 +18,7 @@ Variants {
|
|||
screen: modelData
|
||||
implicitHeight: Style.barHeight * scaling
|
||||
color: "transparent"
|
||||
|
||||
visible: modelData ? (Settings.data.bar.monitors.includes(modelData.name)
|
||||
|| (Settings.data.bar.monitors.length === 0)) : false
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import qs.Services
|
|||
import qs.Widgets
|
||||
|
||||
NLoader {
|
||||
isLoaded: Settings.data.general.showDock
|
||||
isLoaded: (Settings.data.dock.monitors.length > 0)
|
||||
content: Component {
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
|
@ -19,7 +19,7 @@ NLoader {
|
|||
readonly property real scaling: Scaling.scale(modelData)
|
||||
|
||||
// Auto-hide properties
|
||||
property bool autoHide: Settings.data.general.dockAutoHide
|
||||
property bool autoHide: Settings.data.dock.autoHide
|
||||
property bool hidden: autoHide // Start hidden only if auto-hide is enabled
|
||||
property int hideDelay: 500
|
||||
property int showDelay: 100
|
||||
|
|
@ -39,7 +39,10 @@ NLoader {
|
|||
|
||||
PanelWindow {
|
||||
id: dockWindow
|
||||
visible: true
|
||||
|
||||
// Dock works differently from bar, it is show only if toggled in Settings/Display
|
||||
visible: modelData ? Settings.data.dock.monitors.includes(modelData.name) : false
|
||||
|
||||
screen: modelData
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
anchors.bottom: true
|
||||
|
|
|
|||
|
|
@ -109,21 +109,12 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Dock"
|
||||
description: "Enable the dock at the bottom of the screen"
|
||||
value: Settings.data.general.showDock
|
||||
onToggled: function (v) {
|
||||
Settings.data.general.showDock = v
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Auto-hide Dock"
|
||||
description: "Automatically hide the dock when not in use"
|
||||
value: Settings.data.general.dockAutoHide
|
||||
value: Settings.data.dock.autoHide
|
||||
onToggled: function (v) {
|
||||
Settings.data.general.dockAutoHide = v
|
||||
Settings.data.dock.autoHide = v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Singleton {
|
|||
|
||||
// Used to access via Settings.data.xxx.yyy
|
||||
property var data: adapter
|
||||
|
||||
|
||||
// Flag to prevent unnecessary wallpaper calls during reloads
|
||||
property bool isInitialLoad: true
|
||||
|
||||
|
|
@ -86,8 +86,6 @@ Singleton {
|
|||
property string avatarImage: defaultAvatar
|
||||
property bool dimDesktop: true
|
||||
property bool showScreenCorners: false
|
||||
property bool showDock: false
|
||||
property bool dockAutoHide: false
|
||||
}
|
||||
|
||||
// location
|
||||
|
|
@ -149,6 +147,7 @@ Singleton {
|
|||
property JsonObject dock
|
||||
|
||||
dock: JsonObject {
|
||||
property bool autoHide: false
|
||||
property bool exclusive: false
|
||||
property list<string> monitors: []
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue