Merge branch 'rebuild' of https://github.com/Ly-sec/Noctalia into rebuild

This commit is contained in:
Ly-sec 2025-08-14 13:58:32 +02:00
commit 94a646cfb3
8 changed files with 38 additions and 42 deletions

View file

@ -1,6 +1,7 @@
import QtQuick
import Quickshell
import Quickshell.Services.Pipewire
import qs.Modules.Settings
import qs.Services
import qs.Widgets
@ -52,7 +53,7 @@ Item {
}
}
onClicked: {
settingsPanel.requestedTab = settingsPanel.tabsIds.AUDIO
settingsPanel.requestedTab = SettingsPanel.Tab.Audio
settingsPanel.isLoaded = true
}
}

View file

@ -10,26 +10,22 @@ import qs.Widgets
NLoader {
id: root
property var tabsIds: null
property var requestedTab: null
Component.onCompleted: {
// Fill up our ideads
tabsIds = Object.freeze({
"GENERAL": 0,
"BAR": 1,
"TIME_WEATHER": 2,
"SCREEN_RECORDER": 3,
"NETWORK": 4,
"AUDIO": 5,
"DISPLAY": 6,
"WALLPAPER": 7,
"WALLPAPER_SELECTOR": 8,
"MISC": 9,
"ABOUT": 10
})
enum Tab {
General,
Bar,
TimeWeather,
ScreenRecorder,
Network,
Audio,
Display,
Wallpaper,
WallpaperSelector,
//Misc,
About
}
property int requestedTab: SettingsPanel.Tab.General
content: Component {
NPanel {
id: panel
@ -74,63 +70,67 @@ NLoader {
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
property var tabsModel: [{
"id": root.tabsIds.GENERAL,
"id": SettingsPanel.Tab.General,
"label": "General",
"icon": "tune",
"source": "Tabs/General.qml"
}, {
"id": root.tabsIds.BAR,
"id": SettingsPanel.Tab.Bar,
"label": "Bar",
"icon": "web_asset",
"source": "Tabs/Bar.qml"
}, {
"id": root.tabsIds.TIME_WEATHER,
"id": SettingsPanel.Tab.TimeWeather,
"label": "Time & Weather",
"icon": "schedule",
"source": "Tabs/TimeWeather.qml"
}, {
"id": root.tabsIds.SCREEN_RECORDER,
"id": SettingsPanel.Tab.ScreenRecorder,
"label": "Screen Recorder",
"icon": "videocam",
"source": "Tabs/ScreenRecorder.qml"
}, {
"id": root.tabsIds.NETWORK,
"id": SettingsPanel.Tab.Network,
"label": "Network",
"icon": "lan",
"source": "Tabs/Network.qml"
}, {
"id": root.tabsIds.AUDIO,
"id": SettingsPanel.Tab.Audio,
"label": "Audio",
"icon": "volume_up",
"source": "Tabs/Audio.qml"
}, {
"id": root.tabsIds.DISPLAY,
"id": SettingsPanel.Tab.Display,
"label": "Display",
"icon": "monitor",
"source": "Tabs/Display.qml"
}, {
"id": root.tabsIds.WALLPAPER,
"id": SettingsPanel.Tab.Wallpaper,
"label": "Wallpaper",
"icon": "image",
"source": "Tabs/Wallpaper.qml"
}, {
"id": root.tabsIds.WALLPAPER_SELECTOR,
"id": SettingsPanel.Tab.WallpaperSelector,
"label": "Wallpaper Selector",
"icon": "wallpaper_slideshow",
"source": "Tabs/WallpaperSelector.qml"
}, // {
// "id": root.tabsIds.MISC,
// "id": SettingsPanel.Tab.Misc,
// "label": "Misc",
// "icon": "more_horiz",
// "source": "Tabs/Misc.qml"
// },
{
"id": root.tabsIds.ABOUT,
"id": SettingsPanel.Tab.About,
"label": "About",
"icon": "info",
"source": "Tabs/About.qml"
}]
Component.onCompleted: {
show()
}
// Combined visibility change handler
onVisibleChanged: {
if (visible) {
@ -156,8 +156,6 @@ NLoader {
}
}
Component.onCompleted: show()
Rectangle {
id: bgRect
color: Colors.backgroundPrimary

View file

@ -4,9 +4,10 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Quickshell.Widgets
import qs.Modules.Settings
import qs.Modules.SidePanel
import qs.Services
import qs.Widgets
import qs.Modules.SidePanel
// Header card with avatar, user and quick actions
NBox {
@ -15,8 +16,6 @@ NBox {
readonly property real scaling: Scaling.scale(screen)
property string uptimeText: "--"
Layout.fillWidth: true
// Height driven by content
implicitHeight: content.implicitHeight + Style.marginMedium * 2 * scaling
@ -61,7 +60,7 @@ NBox {
icon: "settings"
tooltipText: "Open settings"
onClicked: {
settingsPanel.requestedTab = settingsPanel.tabsIds.GENERAL
settingsPanel.requestedTab = SettingsPanel.Tab.General
settingsPanel.isLoaded = !settingsPanel.isLoaded
}
}

View file

@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import qs.Modules.Settings
import qs.Services
import qs.Widgets
@ -31,7 +32,7 @@ NBox {
NIconButton {
icon: "image"
onClicked: {
settingsPanel.requestedTab = settingsPanel.tabsIds.WALLPAPER_SELECTOR
settingsPanel.requestedTab = SettingsPanel.Tab.WallpaperSelector
settingsPanel.isLoaded = true
}
}

View file

@ -12,8 +12,6 @@ NPanel {
id: powerMenu
visible: false
// Anchors will be set by the parent component
function show() {
visible = true

View file

@ -15,7 +15,6 @@ NLoader {
// Target screen to open on
property var targetScreen: null
function openAt(x, screen) {
anchorX = x
targetScreen = screen