remove everything

This commit is contained in:
2026-10-29 20:32:54 +13:00
parent 852a5fe82e
commit 88f4c7312d
118 changed files with 0 additions and 10013 deletions
-17
View File
@@ -1,17 +0,0 @@
import QtQuick
QtObject {
id: shell
readonly property DesktopSurface desktop: DesktopSurface {}
readonly property TopBarSurface topBar: TopBarSurface {}
readonly property WindowChromeSurface windowChrome: WindowChromeSurface {}
readonly property LauncherSurface launcher: LauncherSurface {}
readonly property Shortcut closeLauncherShortcut: Shortcut {
sequence: "Escape"
enabled: ShellState.launcherOpen
context: Qt.ApplicationShortcut
onActivated: ShellState.closeLauncher()
}
}
-24
View File
@@ -1,24 +0,0 @@
pragma Singleton
import QtQuick
import Nebula.Windows
QtObject {
property bool launcherOpen: false
readonly property string activeApplication: WindowService.focusedApplicationName.length > 0
? WindowService.focusedApplicationName
: qsTr("Desktop")
function openLauncher() {
launcherOpen = true
}
function closeLauncher() {
launcherOpen = false
}
function toggleLauncher() {
launcherOpen = !launcherOpen
}
}
@@ -1,173 +0,0 @@
import QtQuick
import Nebula.UI
Item {
id: root
property string variant: "tile"
property var item
signal selected(var item)
readonly property bool rowVariant: variant === "row"
readonly property int iconSize: rowVariant ? 32 : (variant === "recent" ? 32 : 40)
readonly property int glyphSize: rowVariant ? 16 : 18
readonly property string iconName: item && item.iconName ? item.iconName : ""
readonly property string fallbackGlyph: {
if (item && item.glyph)
return item.glyph
if (item && item.kind)
return item.kind
return "application"
}
readonly property url iconSource: iconName.length > 0
? ("image://desktopicon/" + encodeURIComponent(iconName))
: ""
implicitWidth: rowVariant ? parent ? parent.width : 200 : 90
implicitHeight: rowVariant ? 48 : 78
Accessible.role: Accessible.Button
Accessible.name: item ? item.name : ""
Accessible.onPressAction: root.selected(item)
Rectangle {
anchors.fill: parent
radius: Theme.radiusMedium
color: hover.containsMouse ? Theme.tileHover : "transparent"
Behavior on color {
ColorAnimation {
duration: Theme.animationFast
}
}
}
Column {
visible: !root.rowVariant
anchors.fill: parent
anchors.topMargin: 10
anchors.bottomMargin: 8
anchors.leftMargin: 6
anchors.rightMargin: 6
spacing: 8
Rectangle {
width: root.iconSize
height: root.iconSize
radius: root.variant === "recent" ? 9 : 11
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.iconWell
Rectangle {
anchors.fill: parent
radius: parent.radius
color: "transparent"
border.color: Theme.iconWellHighlight
border.width: 1
}
Image {
id: tileIcon
anchors.centerIn: parent
width: root.iconSize - 8
height: root.iconSize - 8
fillMode: Image.PreserveAspectFit
asynchronous: true
smooth: true
cache: true
visible: status === Image.Ready
source: root.iconSource
}
NebulaIcon {
anchors.centerIn: parent
visible: tileIcon.status !== Image.Ready
name: root.fallbackGlyph
size: root.glyphSize
color: item && item.tint ? item.tint : Theme.accent
}
}
Text {
width: parent.width
text: item ? item.name : ""
color: Theme.textPrimary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeApp
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
}
}
Row {
visible: root.rowVariant
anchors.fill: parent
anchors.margins: 8
spacing: 10
Rectangle {
width: root.iconSize
height: root.iconSize
radius: 9
anchors.verticalCenter: parent.verticalCenter
color: Theme.iconWell
Image {
id: rowIcon
anchors.centerIn: parent
width: root.iconSize - 8
height: root.iconSize - 8
fillMode: Image.PreserveAspectFit
asynchronous: true
smooth: true
cache: true
visible: status === Image.Ready
source: root.iconSource
}
NebulaIcon {
anchors.centerIn: parent
visible: rowIcon.status !== Image.Ready
name: root.fallbackGlyph
size: root.glyphSize
color: item && item.tint ? item.tint : Theme.accent
}
}
Column {
anchors.verticalCenter: parent.verticalCenter
width: parent.width - root.iconSize - 10
spacing: 1
Text {
width: parent.width
text: item ? item.name : ""
color: Theme.textPrimary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeApp
elide: Text.ElideRight
}
Text {
width: parent.width
visible: item && item.subtitle ? true : false
text: item && item.subtitle ? item.subtitle : ""
color: Theme.textTertiary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
elide: Text.ElideRight
}
}
}
MouseArea {
id: hover
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.selected(item)
}
FocusFrame {
radius: Theme.radiusMedium
}
}
@@ -1,39 +0,0 @@
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)
}
}
@@ -1,350 +0,0 @@
import QtQuick
import Nebula.UI
import Nebula.Applications
import Nebula.Windows
Item {
id: root
property real yOffset: 0
implicitWidth: 420
implicitHeight: 14 + searchField.implicitHeight + 14 + bodyColumn.implicitHeight + 14 + footer.height + 14
transform: Translate { y: root.yOffset }
transformOrigin: Item.TopLeft
Accessible.role: Accessible.Dialog
Accessible.name: qsTr("Launcher")
readonly property bool usingInstalledApps: ApplicationService.count > 0
readonly property bool searching: searchField.text.trim().length > 0
readonly property var mockMatches: {
const query = searchField.text.trim().toLowerCase()
const apps = MockApps.apps
if (!query)
return apps
return apps.filter((app) => {
const haystack = (app.name + " " + (app.comment || "")).toLowerCase()
return haystack.indexOf(query) !== -1
})
}
readonly property int resultCount: usingInstalledApps
? ApplicationService.filteredModel.count
: mockMatches.length
Keys.onEscapePressed: {
event.accepted = true
ShellState.closeLauncher()
}
Connections {
target: ShellState
function onLauncherOpenChanged() {
if (ShellState.launcherOpen) {
searchField.text = ""
searchField.input.forceActiveFocus()
} else {
searchField.text = ""
}
}
}
NebulaCard {
id: card
anchors.fill: parent
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
}
}
Column {
id: column
anchors.fill: parent
anchors.margins: 14
spacing: 0
NebulaTextField {
id: searchField
width: parent.width
placeholderText: qsTr("Search applications")
onTextChanged: ApplicationService.filter = text
}
Item {
width: 1
height: 14
}
Flickable {
id: body
width: parent.width
height: Math.max(0, column.height - searchField.height - footer.height - 29)
clip: true
contentWidth: width
contentHeight: bodyColumn.implicitHeight
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.VerticalFlick
Column {
id: bodyColumn
width: body.width
spacing: 18
Column {
width: parent.width
spacing: 8
visible: !root.searching && !root.usingInstalledApps && MockApps.recents.length > 0
Text {
text: qsTr("Recent")
color: Theme.textSecondary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.DemiBold
font.letterSpacing: 0.4
}
Grid {
id: recentGrid
width: parent.width
columns: 4
columnSpacing: 6
rowSpacing: 6
Repeater {
model: MockApps.recents
delegate: AppItem {
required property var modelData
width: (recentGrid.width - 18) / 4
variant: "recent"
item: modelData
onSelected: root.launchApp(item)
}
}
}
}
Column {
width: parent.width
spacing: 8
Text {
text: root.searching ? qsTr("Results") : qsTr("Applications")
color: Theme.textSecondary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.DemiBold
font.letterSpacing: 0.4
}
Grid {
id: appGrid
visible: root.resultCount > 0
width: parent.width
columns: 4
columnSpacing: 6
rowSpacing: 6
Repeater {
model: root.usingInstalledApps ? ApplicationService.filteredModel : []
delegate: AppItem {
required property string desktopId
required property string name
required property string comment
required property string iconName
width: (appGrid.width - 18) / 4
variant: "tile"
item: ({
desktopId: desktopId,
name: name,
comment: comment,
iconName: iconName
})
onSelected: root.launchApp(item)
}
}
Repeater {
model: root.usingInstalledApps ? [] : root.mockMatches
delegate: AppItem {
required property var modelData
width: (appGrid.width - 18) / 4
variant: "tile"
item: modelData
onSelected: root.launchApp(item)
}
}
}
Text {
visible: root.resultCount === 0
width: parent.width
topPadding: 8
text: qsTr("No matching applications")
color: Theme.textTertiary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSize
}
}
Column {
width: parent.width
spacing: 8
visible: !root.searching && WindowService.windowCount > 0
Text {
text: qsTr("Open Windows")
color: Theme.textSecondary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.DemiBold
font.letterSpacing: 0.4
}
Column {
width: parent.width
spacing: 2
Repeater {
model: WindowService.model
delegate: OpenWindowItem {
width: parent.width
}
}
}
}
Column {
width: parent.width
spacing: 8
visible: !root.searching && !root.usingInstalledApps && MockApps.projects.length > 0
Text {
text: qsTr("Recent projects")
color: Theme.textSecondary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.DemiBold
font.letterSpacing: 0.4
}
Column {
width: parent.width
spacing: 2
Repeater {
model: MockApps.projects
delegate: AppItem {
required property var modelData
width: parent.width
variant: "row"
item: modelData
onSelected: root.openProject(item)
}
}
}
}
}
}
Item {
width: 1
height: 14
}
Rectangle {
width: parent.width
height: 1
color: Theme.border
}
Item {
id: footer
width: parent.width
height: 38
Row {
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
spacing: 10
Rectangle {
width: 28
height: 28
radius: 14
color: Theme.accentSoft
anchors.verticalCenter: parent.verticalCenter
Text {
anchors.centerIn: parent
text: MockApps.user.initials
color: Theme.accentStrong
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeApp
font.weight: Font.DemiBold
}
}
Column {
anchors.verticalCenter: parent.verticalCenter
spacing: 0
Text {
text: MockApps.user.name
color: Theme.textPrimary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSize
font.weight: Font.DemiBold
}
Text {
text: qsTr("Local session")
color: Theme.textTertiary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
}
}
}
Row {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: 2
NebulaIconButton {
id: restartButton
label: qsTr("Restart")
onClicked: console.info("nebula: restart requested")
NebulaIcon {
name: "restart"
size: 16
color: restartButton.iconColor
}
}
NebulaIconButton {
id: shutdownButton
label: qsTr("Shut down")
danger: true
onClicked: console.info("nebula: shutdown requested")
NebulaIcon {
name: "power"
size: 16
color: shutdownButton.iconColor
}
}
}
}
}
function launchApp(app) {
if (app && app.desktopId)
ApplicationService.launch(app.desktopId)
ShellState.closeLauncher()
}
function openProject(project) {
ShellState.closeLauncher()
}
}
@@ -1,64 +0,0 @@
import QtQuick
import Nebula.UI
Item {
id: root
implicitWidth: row.implicitWidth + 18
implicitHeight: Theme.controlHeight
property bool checked: false
signal clicked()
Accessible.role: Accessible.Button
Accessible.name: qsTr("Nebula")
Accessible.checkable: true
Accessible.checked: root.checked
Accessible.onPressAction: root.clicked()
Rectangle {
anchors.fill: parent
radius: Theme.radiusSmall
color: (hover.containsMouse || root.checked) ? Theme.accentSoft : "transparent"
Behavior on color {
ColorAnimation {
duration: Theme.animationFast
}
}
}
Row {
id: row
anchors.centerIn: parent
spacing: 8
NebulaIcon {
name: "nebula"
size: 18
color: root.checked ? Theme.accentStrong : Theme.textPrimary
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: qsTr("Nebula")
color: root.checked ? Theme.accentStrong : Theme.textPrimary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSize
font.weight: Font.DemiBold
anchors.verticalCenter: parent.verticalCenter
}
}
MouseArea {
id: hover
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
}
FocusFrame {
radius: Theme.radiusSmall
}
}
@@ -1,135 +0,0 @@
import QtQuick
import Nebula.UI
import Nebula.Windows
Item {
id: root
required property string windowId
required property string displayName
required property string iconName
required property bool focused
required property bool minimized
implicitWidth: parent ? parent.width : 200
implicitHeight: 36
Accessible.role: Accessible.ListItem
Accessible.name: displayName
Accessible.onPressAction: root.activate()
readonly property url iconSource: iconName.length > 0
? ("image://desktopicon/" + encodeURIComponent(iconName))
: ""
function activate() {
WindowService.focusWindow(windowId)
ShellState.closeLauncher()
}
Rectangle {
anchors.fill: parent
radius: Theme.radiusSmall
color: {
if (hover.containsMouse)
return Theme.tileHover
if (root.focused)
return Theme.accentSoft
return "transparent"
}
Behavior on color {
ColorAnimation {
duration: Theme.animationFast
}
}
}
Row {
anchors.fill: parent
anchors.leftMargin: 8
anchors.rightMargin: 4
spacing: 8
Rectangle {
width: 22
height: 22
radius: 6
anchors.verticalCenter: parent.verticalCenter
color: Theme.iconWell
Image {
id: icon
anchors.centerIn: parent
width: 14
height: 14
fillMode: Image.PreserveAspectFit
asynchronous: true
smooth: true
cache: true
visible: status === Image.Ready
source: root.iconSource
}
NebulaIcon {
anchors.centerIn: parent
visible: icon.status !== Image.Ready
name: "application"
size: 12
color: Theme.accent
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
width: parent.width - 22 - 28 - 16
text: root.displayName
color: {
if (root.minimized)
return Theme.textTertiary
if (root.focused)
return Theme.textPrimary
return Theme.textSecondary
}
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeApp
elide: Text.ElideRight
}
Item {
width: 28
height: parent.height
Text {
anchors.centerIn: parent
text: "×"
color: closeHover.containsMouse ? Theme.danger : Theme.textTertiary
font.pixelSize: 14
font.family: Theme.fontFamily
}
MouseArea {
id: closeHover
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: WindowService.closeWindow(root.windowId)
}
Accessible.role: Accessible.Button
Accessible.name: qsTr("Close %1").arg(root.displayName)
}
}
MouseArea {
id: hover
anchors.fill: parent
anchors.rightMargin: 28
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.activate()
}
FocusFrame {
radius: Theme.radiusSmall
}
}
@@ -1,47 +0,0 @@
import QtQuick
import Nebula.UI
Row {
id: root
spacing: 2
// Placeholder system status until native services exist.
readonly property int wifiStrength: 3
readonly property int volumePercent: 72
readonly property int batteryPercent: 84
NebulaIconButton {
id: networkButton
label: qsTr("Network connected, Nebula-Net")
NebulaIcon {
name: "wifi"
size: 16
color: networkButton.iconColor
value: root.wifiStrength
}
}
NebulaIconButton {
id: volumeButton
label: qsTr("Volume %1%").arg(root.volumePercent)
NebulaIcon {
name: "speaker"
size: 16
color: volumeButton.iconColor
}
}
NebulaIconButton {
id: powerButton
label: qsTr("Battery %1%").arg(root.batteryPercent)
NebulaIcon {
name: "battery"
size: 16
color: powerButton.iconColor
value: root.batteryPercent
}
}
Clock {}
}
@@ -1,63 +0,0 @@
import QtQuick
import Nebula.UI
Item {
id: root
implicitHeight: Theme.topBarHeight
Rectangle {
anchors.fill: parent
color: Theme.topBarBackground
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: Theme.border
}
}
Row {
id: left
anchors.left: parent.left
anchors.leftMargin: 6
anchors.right: systemArea.left
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
spacing: 8
NebulaButton {
id: nebulaButton
checked: ShellState.launcherOpen
onClicked: ShellState.toggleLauncher()
}
Rectangle {
id: leftDivider
anchors.verticalCenter: parent.verticalCenter
width: 1
height: 14
color: Theme.borderStrong
}
Text {
anchors.verticalCenter: parent.verticalCenter
width: Math.min(implicitWidth, Math.max(0, left.width - nebulaButton.width - leftDivider.width - left.spacing * 2))
text: ShellState.activeApplication
color: Theme.textSecondary
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSize
elide: Text.ElideRight
maximumLineCount: 1
}
}
SystemArea {
id: systemArea
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
}
}
@@ -1,126 +0,0 @@
import QtQuick
import Nebula.UI
Item {
id: root
property string label: ""
property color fill: Theme.trafficClose
property string glyph: "close"
property bool showGlyph: false
readonly property bool hovered: hover.containsMouse
readonly property bool pressed: hover.pressed
signal clicked()
implicitWidth: Theme.trafficLightSize + 6
implicitHeight: Theme.trafficLightSize + 6
Accessible.role: Accessible.Button
Accessible.name: root.label
Accessible.onPressAction: root.clicked()
Rectangle {
id: disc
anchors.centerIn: parent
width: Theme.trafficLightSize
height: Theme.trafficLightSize
radius: width / 2
color: hover.pressed ? Qt.darker(root.fill, 1.18) : root.fill
border.width: 1
border.color: Qt.rgba(0, 0, 0, 0.22)
Behavior on color {
ColorAnimation {
duration: Theme.animationFast
}
}
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 1
width: parent.width - 4
height: Math.max(2, parent.height * 0.38)
radius: height / 2
color: Qt.rgba(1, 1, 1, 0.28)
Accessible.ignored: true
}
}
Canvas {
id: glyph
anchors.centerIn: parent
width: Math.round(Theme.trafficLightSize * 0.58)
height: width
antialiasing: true
opacity: root.showGlyph ? 1 : 0
visible: opacity > 0.01
onWidthChanged: requestPaint()
onHeightChanged: requestPaint()
onPaint: {
const ctx = getContext("2d")
ctx.reset()
ctx.scale(width / 8, height / 8)
ctx.strokeStyle = Qt.rgba(0.18, 0.12, 0.1, 0.78)
ctx.fillStyle = ctx.strokeStyle
ctx.lineWidth = 1.35
ctx.lineCap = "round"
ctx.lineJoin = "round"
switch (root.glyph) {
case "minimize":
ctx.beginPath()
ctx.moveTo(1.2, 4)
ctx.lineTo(6.8, 4)
ctx.stroke()
break
case "zoom":
ctx.beginPath()
ctx.moveTo(1.4, 4)
ctx.lineTo(6.6, 4)
ctx.moveTo(4, 1.4)
ctx.lineTo(4, 6.6)
ctx.stroke()
break
case "restore":
ctx.beginPath()
ctx.rect(2.3, 0.7, 4.3, 4.3)
ctx.stroke()
ctx.beginPath()
ctx.rect(0.7, 2.3, 4.3, 4.3)
ctx.stroke()
break
default:
ctx.beginPath()
ctx.moveTo(1.6, 1.6)
ctx.lineTo(6.4, 6.4)
ctx.moveTo(6.4, 1.6)
ctx.lineTo(1.6, 6.4)
ctx.stroke()
break
}
}
Behavior on opacity {
NumberAnimation {
duration: Theme.animationFast
}
}
}
onGlyphChanged: glyph.requestPaint()
onShowGlyphChanged: if (showGlyph) glyph.requestPaint()
MouseArea {
id: hover
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
}
NebulaToolTip {
text: root.label
active: hover.containsMouse && !hover.pressed && root.label.length > 0
}
}
@@ -1,48 +0,0 @@
import QtQuick
import Nebula.UI
import Nebula.Windows
Item {
id: root
readonly property bool maximized: WindowService.focusedWindowMaximized
readonly property bool hovered: closeButton.hovered || minimizeButton.hovered || zoomButton.hovered
implicitWidth: row.implicitWidth
implicitHeight: row.implicitHeight
Accessible.role: Accessible.Grouping
Accessible.name: qsTr("Window controls")
Row {
id: row
anchors.centerIn: parent
spacing: Theme.trafficLightGap
TrafficLightButton {
id: closeButton
fill: Theme.trafficClose
glyph: "close"
label: qsTr("Close")
showGlyph: root.hovered
onClicked: WindowService.closeFocusedWindow()
}
TrafficLightButton {
id: minimizeButton
fill: Theme.trafficMinimise
glyph: "minimize"
label: qsTr("Minimise")
showGlyph: root.hovered
onClicked: WindowService.minimizeFocusedWindow()
}
TrafficLightButton {
id: zoomButton
fill: Theme.trafficZoom
glyph: root.maximized ? "restore" : "zoom"
label: root.maximized ? qsTr("Restore") : qsTr("Maximise")
showGlyph: root.hovered
onClicked: WindowService.toggleMaximizeFocusedWindow()
}
}
}
-100
View File
@@ -1,100 +0,0 @@
pragma Singleton
import QtQuick
QtObject {
readonly property var apps: [
{
id: "files",
name: "Files",
comment: "Browse files and folders",
recent: true,
glyph: "folder",
tint: "#c4a574"
},
{
id: "firefox",
name: "Firefox",
comment: "Web browser",
recent: true,
glyph: "globe",
tint: "#d08a5a"
},
{
id: "terminal",
name: "Terminal",
comment: "Command line",
recent: true,
glyph: "terminal",
tint: "#7eaa8e"
},
{
id: "settings",
name: "Settings",
comment: "System preferences",
recent: false,
glyph: "settings",
tint: "#8e99ab"
},
{
id: "steam",
name: "Steam",
comment: "Games",
recent: true,
glyph: "game",
tint: "#6f8fb8"
},
{
id: "photos",
name: "Photos",
comment: "Pictures and albums",
recent: false,
glyph: "photo",
tint: "#8aa8c4"
},
{
id: "music",
name: "Music",
comment: "Listen and organise",
recent: false,
glyph: "music",
tint: "#b48a9a"
},
{
id: "text-editor",
name: "Text Editor",
comment: "Edit documents",
recent: false,
glyph: "document",
tint: "#9aa7bc"
}
]
readonly property var recents: apps.filter((app) => app.recent)
readonly property var projects: [
{
id: "nebulaos",
name: "NebulaOS",
subtitle: "Repository",
kind: "folder"
},
{
id: "website",
name: "Website",
subtitle: "Project",
kind: "folder"
},
{
id: "session-notes",
name: "Session notes",
subtitle: "Document",
kind: "document"
}
]
readonly property var user: ({
name: "User",
initials: "N"
})
}
@@ -1,71 +0,0 @@
import QtQuick
import QtQuick.Window
import org.kde.layershell 1.0 as LayerShell
import Nebula.UI
Window {
id: root
readonly property int outputWidth: OutputTracker.width > 0
? OutputTracker.width
: (screen && screen.width > 0 ? screen.width : Screen.width)
readonly property int outputHeight: OutputTracker.height > 0
? OutputTracker.height
: (screen && screen.height > 0 ? screen.height : Screen.height)
title: qsTr("Nebula Desktop")
color: "transparent"
flags: Qt.FramelessWindowHint | Qt.WindowDoesNotAcceptFocus
visible: true
width: outputWidth
height: outputHeight
LayerShell.Window.scope: "nebula-desktop"
LayerShell.Window.layer: LayerShell.Window.LayerBackground
LayerShell.Window.anchors: LayerShell.Window.AnchorTop
| LayerShell.Window.AnchorBottom
| LayerShell.Window.AnchorLeft
| LayerShell.Window.AnchorRight
LayerShell.Window.exclusionZone: 0
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
Canvas {
id: backdrop
anchors.fill: parent
onPaint: {
const ctx = getContext("2d")
ctx.reset()
ctx.fillStyle = Theme.background
ctx.fillRect(0, 0, width, height)
let glow = ctx.createRadialGradient(width * 0.12, height * -0.08, 0, width * 0.12, height * -0.08, width * 0.7)
glow.addColorStop(0, "rgba(110, 140, 180, 0.16)")
glow.addColorStop(0.52, "rgba(110, 140, 180, 0)")
ctx.fillStyle = glow
ctx.fillRect(0, 0, width, height)
glow = ctx.createRadialGradient(width * 0.88, height * 1.08, 0, width * 0.88, height * 1.08, width * 0.45)
glow.addColorStop(0, "rgba(42, 68, 98, 0.28)")
glow.addColorStop(0.58, "rgba(42, 68, 98, 0)")
ctx.fillStyle = glow
ctx.fillRect(0, 0, width, height)
glow = ctx.createRadialGradient(width * 0.62, height * 0.38, 0, width * 0.62, height * 0.38, width * 0.28)
glow.addColorStop(0, "rgba(72, 92, 120, 0.08)")
glow.addColorStop(0.7, "rgba(72, 92, 120, 0)")
ctx.fillStyle = glow
ctx.fillRect(0, 0, width, height)
const veil = ctx.createLinearGradient(0, 0, 0, height)
veil.addColorStop(0, "rgba(8, 11, 17, 0.22)")
veil.addColorStop(0.16, "rgba(8, 11, 17, 0)")
veil.addColorStop(0.78, "rgba(8, 11, 17, 0)")
veil.addColorStop(1, "rgba(8, 11, 17, 0.38)")
ctx.fillStyle = veil
ctx.fillRect(0, 0, width, height)
}
onWidthChanged: requestPaint()
onHeightChanged: requestPaint()
}
}
@@ -1,82 +0,0 @@
import QtQuick
import QtQuick.Window
import org.kde.layershell 1.0 as LayerShell
import Nebula.UI
Window {
id: root
readonly property int outputWidth: OutputTracker.width > 0
? OutputTracker.width
: (screen && screen.width > 0 ? screen.width : Screen.width)
readonly property int outputHeight: OutputTracker.height > 0
? OutputTracker.height
: (screen && screen.height > 0 ? screen.height : Screen.height)
title: qsTr("Nebula Launcher")
color: "transparent"
flags: Qt.FramelessWindowHint
visible: ShellState.launcherOpen || launcher.opacity > 0.01
width: outputWidth
height: Math.max(1, outputHeight - 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
}
}
}
}
@@ -1,31 +0,0 @@
import QtQuick
import QtQuick.Window
import org.kde.layershell 1.0 as LayerShell
import Nebula.UI
Window {
id: root
readonly property int outputWidth: OutputTracker.width > 0
? OutputTracker.width
: (screen && screen.width > 0 ? screen.width : Screen.width)
title: qsTr("Nebula Top Bar")
color: "transparent"
flags: Qt.FramelessWindowHint | Qt.WindowDoesNotAcceptFocus
visible: true
width: outputWidth
height: Theme.topBarHeight
LayerShell.Window.scope: "nebula-topbar"
LayerShell.Window.layer: LayerShell.Window.LayerTop
LayerShell.Window.anchors: LayerShell.Window.AnchorTop
| LayerShell.Window.AnchorLeft
| LayerShell.Window.AnchorRight
LayerShell.Window.exclusionZone: Theme.topBarHeight
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
TopBar {
anchors.fill: parent
}
}
@@ -1,42 +0,0 @@
import QtQuick
import QtQuick.Window
import org.kde.layershell 1.0 as LayerShell
import Nebula.UI
import Nebula.Windows
Window {
id: root
readonly property bool active: WindowService.hasFocusedWindow
&& !WindowService.focusedWindowFullscreen
&& !ShellState.launcherOpen
readonly property int chromeX: WindowService.focusedWindowX
+ Theme.windowChromeInset
- WindowService.focusedWorkspaceX
readonly property int chromeY: {
const barH = WindowService.focusedWindowTitleBarHeight
const centered = WindowService.focusedWindowTitleBarY
+ Math.max(0, Math.round((barH - height) / 2))
return centered - WindowService.focusedWorkspaceY
}
title: qsTr("Nebula Window Chrome")
color: "transparent"
flags: Qt.FramelessWindowHint | Qt.WindowDoesNotAcceptFocus
visible: root.active
width: Math.max(1, controls.implicitWidth)
height: Math.max(1, controls.implicitHeight)
LayerShell.Window.scope: "nebula-window-chrome"
LayerShell.Window.layer: LayerShell.Window.LayerTop
LayerShell.Window.anchors: LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorTop
LayerShell.Window.margins.left: Math.max(0, chromeX)
LayerShell.Window.margins.top: Math.max(0, chromeY)
LayerShell.Window.exclusionZone: 0
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
WindowControls {
id: controls
anchors.centerIn: parent
}
}