dock: add bar strip with pin toggle when pinned, hide from main bar

This commit is contained in:
Damocles 2026-04-29 17:36:57 +02:00
parent 70fea7c4ba
commit 99b63a2756
2 changed files with 47 additions and 2 deletions

View file

@ -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
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
contentHeight: _column.height
clip: true