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,39 @@
|
||||
import QtQuick
|
||||
import QtQml
|
||||
import Nebula.UI
|
||||
|
||||
Text {
|
||||
id: root
|
||||
|
||||
property date now: new Date()
|
||||
|
||||
text: formatClock(now)
|
||||
color: Theme.textPrimary
|
||||
font.family: Theme.fontFamily
|
||||
font.pixelSize: Theme.fontSize
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
leftPadding: 8
|
||||
rightPadding: 8
|
||||
height: Theme.controlHeight
|
||||
Accessible.role: Accessible.StaticText
|
||||
Accessible.name: formatFull(now)
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: root.now = new Date()
|
||||
}
|
||||
|
||||
function formatClock(date) {
|
||||
const locale = Qt.locale()
|
||||
const weekday = locale.toString(date, "ddd")
|
||||
const time = locale.toString(date, locale.timeFormat(Locale.ShortFormat))
|
||||
return weekday + " " + time
|
||||
}
|
||||
|
||||
function formatFull(date) {
|
||||
return Qt.locale().toString(date, Locale.LongFormat)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user