Add Qt/QML desktop shell and Nebula.UI
Introduce a new production desktop shell at `shells/desktop/shell` built with C++20, Qt Quick/QML, and LayerShellQt, including top bar, launcher, desktop surfaces, shell state, and mock app data. Add the shared `packages/nebula-ui` QML module (theme, controls, focus, icons) and wire it into the shell build. Retire the old GTK/WebKit native host by removing `shells/desktop/native`, move the React shell UI to `shells/desktop/prototype-react` as an archived design reference, and update root/compositor/session documentation to reflect the new Linux-only production architecture and temporary Sway role.
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import org.kde.layershell 1.0 as LayerShell
|
||||
import Nebula.UI
|
||||
|
||||
Window {
|
||||
id: root
|
||||
|
||||
title: qsTr("Nebula Launcher")
|
||||
color: "transparent"
|
||||
flags: Qt.FramelessWindowHint
|
||||
visible: ShellState.launcherOpen || launcher.opacity > 0.01
|
||||
width: Screen.width
|
||||
height: Screen.height - Theme.topBarHeight
|
||||
|
||||
LayerShell.Window.scope: "nebula-launcher"
|
||||
LayerShell.Window.layer: LayerShell.Window.LayerOverlay
|
||||
LayerShell.Window.anchors: LayerShell.Window.AnchorTop
|
||||
| LayerShell.Window.AnchorBottom
|
||||
| LayerShell.Window.AnchorLeft
|
||||
| LayerShell.Window.AnchorRight
|
||||
LayerShell.Window.margins.top: Theme.topBarHeight
|
||||
LayerShell.Window.exclusionZone: 0
|
||||
LayerShell.Window.keyboardInteractivity: ShellState.launcherOpen
|
||||
? LayerShell.Window.KeyboardInteractivityExclusive
|
||||
: LayerShell.Window.KeyboardInteractivityNone
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
focus: ShellState.launcherOpen
|
||||
Keys.onEscapePressed: {
|
||||
event.accepted = true
|
||||
ShellState.closeLauncher()
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onClicked: ShellState.closeLauncher()
|
||||
}
|
||||
|
||||
Launcher {
|
||||
id: launcher
|
||||
x: 10
|
||||
y: 10
|
||||
width: Math.min(420, parent.width - 20)
|
||||
height: Math.min(implicitHeight, Math.min(640, parent.height - 24))
|
||||
opacity: ShellState.launcherOpen ? 1 : 0
|
||||
yOffset: ShellState.launcherOpen ? 0 : -6
|
||||
scale: ShellState.launcherOpen ? 1 : 0.985
|
||||
focus: ShellState.launcherOpen
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Theme.animationNormal
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on yOffset {
|
||||
NumberAnimation {
|
||||
duration: Theme.animationNormal
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
duration: Theme.animationNormal
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user