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
|
screen: modelData
|
||||||
implicitHeight: Style.barHeight * scaling
|
implicitHeight: Style.barHeight * scaling
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
visible: modelData ? (Settings.data.bar.monitors.includes(modelData.name)
|
visible: modelData ? (Settings.data.bar.monitors.includes(modelData.name)
|
||||||
|| (Settings.data.bar.monitors.length === 0)) : false
|
|| (Settings.data.bar.monitors.length === 0)) : false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import qs.Services
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
|
|
||||||
NLoader {
|
NLoader {
|
||||||
isLoaded: Settings.data.general.showDock
|
isLoaded: (Settings.data.dock.monitors.length > 0)
|
||||||
content: Component {
|
content: Component {
|
||||||
Variants {
|
Variants {
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
|
@ -19,7 +19,7 @@ NLoader {
|
||||||
readonly property real scaling: Scaling.scale(modelData)
|
readonly property real scaling: Scaling.scale(modelData)
|
||||||
|
|
||||||
// Auto-hide properties
|
// 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 bool hidden: autoHide // Start hidden only if auto-hide is enabled
|
||||||
property int hideDelay: 500
|
property int hideDelay: 500
|
||||||
property int showDelay: 100
|
property int showDelay: 100
|
||||||
|
|
@ -39,7 +39,10 @@ NLoader {
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: dockWindow
|
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
|
screen: modelData
|
||||||
exclusionMode: ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
anchors.bottom: true
|
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 {
|
NToggle {
|
||||||
label: "Auto-hide Dock"
|
label: "Auto-hide Dock"
|
||||||
description: "Automatically hide the dock when not in use"
|
description: "Automatically hide the dock when not in use"
|
||||||
value: Settings.data.general.dockAutoHide
|
value: Settings.data.dock.autoHide
|
||||||
onToggled: function (v) {
|
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
|
// Used to access via Settings.data.xxx.yyy
|
||||||
property var data: adapter
|
property var data: adapter
|
||||||
|
|
||||||
// Flag to prevent unnecessary wallpaper calls during reloads
|
// Flag to prevent unnecessary wallpaper calls during reloads
|
||||||
property bool isInitialLoad: true
|
property bool isInitialLoad: true
|
||||||
|
|
||||||
|
|
@ -86,8 +86,6 @@ Singleton {
|
||||||
property string avatarImage: defaultAvatar
|
property string avatarImage: defaultAvatar
|
||||||
property bool dimDesktop: true
|
property bool dimDesktop: true
|
||||||
property bool showScreenCorners: false
|
property bool showScreenCorners: false
|
||||||
property bool showDock: false
|
|
||||||
property bool dockAutoHide: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// location
|
// location
|
||||||
|
|
@ -149,6 +147,7 @@ Singleton {
|
||||||
property JsonObject dock
|
property JsonObject dock
|
||||||
|
|
||||||
dock: JsonObject {
|
dock: JsonObject {
|
||||||
|
property bool autoHide: false
|
||||||
property bool exclusive: false
|
property bool exclusive: false
|
||||||
property list<string> monitors: []
|
property list<string> monitors: []
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue