added adaptive quickshell
This commit is contained in:
1 parent
6eb56d2065
commit
5b33a73fd8
189 files changed
+8678
-15
No files matched your search
@@ -0,0 +1,52 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "services"
|
||||
import "components"
|
||||
|
||||
// Desktop-only floating shelf. Window activation uses Wayland toplevel handles.
|
||||
PanelWindow {
|
||||
id: shelf
|
||||
signal navigate(string page)
|
||||
readonly property string mode: Preferences.modeFor(screen)
|
||||
visible: mode === "desktop"
|
||||
anchors { bottom: true; left: true; right: true }
|
||||
implicitHeight: 76
|
||||
color: "transparent"
|
||||
WlrLayershell.namespace: "adaptive-desktop-shelf"
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
Rectangle {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 8
|
||||
width: Math.min(shelf.width - 24, Math.max(330, content.implicitWidth + 28))
|
||||
height: 60
|
||||
radius: 30
|
||||
color: Theme.surface
|
||||
border.color: Theme.outline
|
||||
border.width: 1
|
||||
RowLayout {
|
||||
id: content
|
||||
anchors.centerIn: parent
|
||||
spacing: 6
|
||||
ActionButton { text: "◈"; ToolTip.text: "Все приложения"; ToolTip.visible: hovered; onClicked: shelf.navigate("launcher") }
|
||||
Rectangle { width: 1; height: 28; color: Theme.outline; opacity: 0.5 }
|
||||
Repeater {
|
||||
model: ToplevelManager.toplevels.values
|
||||
ActionButton {
|
||||
required property var modelData
|
||||
readonly property var window: modelData
|
||||
text: window.appId ? window.appId.split(".").pop().slice(0, 14) : "Окно"
|
||||
ToolTip.text: window.title || window.appId || "Приложение"
|
||||
ToolTip.visible: hovered
|
||||
onClicked: window.activate()
|
||||
}
|
||||
}
|
||||
Rectangle { width: 1; height: 28; color: Theme.outline; opacity: 0.5 }
|
||||
ActionButton { text: "▣"; ToolTip.text: "Обзор окон"; ToolTip.visible: hovered; onClicked: shelf.navigate("recent") }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user