dock: add bar strip with pin toggle when pinned, hide from main bar
This commit is contained in:
parent
70fea7c4ba
commit
99b63a2756
2 changed files with 47 additions and 2 deletions
|
|
@ -136,10 +136,55 @@ PanelWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dock bar - mirrors main bar style, hosts dock toggle when pinned
|
||||||
|
Item {
|
||||||
|
id: _dockBar
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: S.Theme.barHeight
|
||||||
|
visible: S.DockState.mode === "pinned"
|
||||||
|
|
||||||
|
transform: Translate {
|
||||||
|
x: root._slideX
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: S.Theme.base00
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bottom border - gradient matching bar style (base0C to base09, but just the right end)
|
||||||
|
Rectangle {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
height: 1
|
||||||
|
color: S.Theme.base09
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dock toggle
|
||||||
|
M.BarGroup {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
M.BarModule {
|
||||||
|
tooltip: "Unpin dock"
|
||||||
|
onTapped: S.DockState.toggle()
|
||||||
|
|
||||||
|
M.BarIcon {
|
||||||
|
icon: "\uDB80\uDD8B"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Content - inset past the edge line + gap
|
// Content - inset past the edge line + gap
|
||||||
Flickable {
|
Flickable {
|
||||||
id: _flickable
|
id: _flickable
|
||||||
anchors.fill: parent
|
anchors.top: _dockBar.visible ? _dockBar.bottom : parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
anchors.leftMargin: S.Theme.groupSpacing + 1
|
anchors.leftMargin: S.Theme.groupSpacing + 1
|
||||||
contentHeight: _column.height
|
contentHeight: _column.height
|
||||||
clip: true
|
clip: true
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import "../services" as S
|
||||||
|
|
||||||
M.BarModule {
|
M.BarModule {
|
||||||
id: root
|
id: root
|
||||||
active: S.Modules.dock.enable
|
active: S.Modules.dock.enable && S.DockState.mode !== "pinned"
|
||||||
tooltip: S.DockState.open ? "Close dock" : "Open dock"
|
tooltip: S.DockState.open ? "Close dock" : "Open dock"
|
||||||
onTapped: S.DockState.toggle()
|
onTapped: S.DockState.toggle()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue