dock: pinned mode acts as screen split - bar shrinks, corners adjust, opaque background
This commit is contained in:
parent
c22eb51dcd
commit
f501f977d1
9 changed files with 52 additions and 21 deletions
38
shell/services/DockState.qml
Normal file
38
shell/services/DockState.qml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
// "closed" | "pinned" | "overlay"
|
||||
property string mode: "closed"
|
||||
readonly property bool open: mode !== "closed"
|
||||
|
||||
// Screen space reserved by the dock when pinned.
|
||||
// Bar, screen corners, etc. read this to adjust layout.
|
||||
property int reservedWidth: 0
|
||||
|
||||
onModeChanged: {
|
||||
if (mode !== "pinned")
|
||||
reservedWidth = 0;
|
||||
}
|
||||
|
||||
function openPinned() {
|
||||
mode = "pinned";
|
||||
}
|
||||
|
||||
function openOverlay() {
|
||||
if (mode === "closed")
|
||||
mode = "overlay";
|
||||
}
|
||||
|
||||
function close() {
|
||||
mode = "closed";
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
if (mode === "pinned")
|
||||
mode = "closed";
|
||||
else
|
||||
mode = "pinned";
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ NotifItem 1.0 NotifItem.qml
|
|||
singleton BacklightService 1.0 BacklightService.qml
|
||||
singleton BatteryService 1.0 BatteryService.qml
|
||||
singleton BluetoothService 1.0 BluetoothService.qml
|
||||
singleton DockState 1.0 DockState.qml
|
||||
singleton IdleInhibitService 1.0 IdleInhibitService.qml
|
||||
singleton LockService 1.0 LockService.qml
|
||||
singleton Modules 1.0 Modules.qml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue