mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat(dock): enable peek window activation for static mode to trigger dock panel opening and refine the settings interface by reorganizing components and conditionally showing display mode options
This commit is contained in:
@@ -480,7 +480,7 @@ Loader {
|
||||
|
||||
// PEEK WINDOW
|
||||
Loader {
|
||||
active: (barIsReady || !hasBar) && modelData && (Settings.data.dock.monitors.length === 0 || Settings.data.dock.monitors.includes(modelData.name)) && autoHide
|
||||
active: (barIsReady || !hasBar) && modelData && (Settings.data.dock.monitors.length === 0 || Settings.data.dock.monitors.includes(modelData.name)) && (autoHide || isStaticMode)
|
||||
|
||||
sourceComponent: PanelWindow {
|
||||
id: peekWindow
|
||||
@@ -513,6 +513,12 @@ Loader {
|
||||
|
||||
onEntered: {
|
||||
peekHovered = true;
|
||||
if (isStaticMode && !autoHide) {
|
||||
const panel = getStaticDockPanel();
|
||||
if (panel && !panel.isPanelOpen)
|
||||
panel.open();
|
||||
return;
|
||||
}
|
||||
if (hidden) {
|
||||
showTimer.start();
|
||||
}
|
||||
|
||||
@@ -50,6 +50,26 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.dock.appearance-type-label")
|
||||
description: I18n.tr("panels.dock.appearance-type-description")
|
||||
model: [
|
||||
{
|
||||
"key": "floating",
|
||||
"name": I18n.tr("panels.dock.appearance-type-floating")
|
||||
},
|
||||
{
|
||||
"key": "static",
|
||||
"name": I18n.tr("panels.dock.appearance-type-static")
|
||||
}
|
||||
]
|
||||
currentKey: Settings.data.dock.dockType
|
||||
defaultValue: Settings.getDefaultValue("dock.dockType")
|
||||
onSelected: key => Settings.data.dock.dockType = key
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
visible: Settings.data.dock.dockType === "floating"
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.display.title")
|
||||
description: I18n.tr("panels.dock.appearance-display-description")
|
||||
@@ -74,25 +94,6 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.dock.appearance-type-label")
|
||||
description: I18n.tr("panels.dock.appearance-type-description")
|
||||
model: [
|
||||
{
|
||||
"key": "floating",
|
||||
"name": I18n.tr("panels.dock.appearance-type-floating")
|
||||
},
|
||||
{
|
||||
"key": "static",
|
||||
"name": I18n.tr("panels.dock.appearance-type-static")
|
||||
}
|
||||
]
|
||||
currentKey: Settings.data.dock.dockType
|
||||
defaultValue: Settings.getDefaultValue("dock.dockType")
|
||||
onSelected: key => Settings.data.dock.dockType = key
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.osd.background-opacity-label")
|
||||
|
||||
Reference in New Issue
Block a user