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

This commit is contained in:
quadbyte 2025-08-15 09:08:07 -04:00
commit 474bade65c
6 changed files with 27 additions and 5 deletions

View file

@ -15,13 +15,15 @@ NIconButton {
showBorder: false
icon: {
let connected = false
let signalStrength = 0
for (const net in network.networks) {
if (network.networks[net].connected) {
connected = true
signalStrength = network.networks[net].signal
break
}
}
return connected ? network.signalIcon(parent.currentSignal) : "wifi_off"
return connected ? network.signalIcon(signalStrength) : "wifi_off"
}
tooltipText: "WiFi Networks"
onClicked: {

View file

@ -77,8 +77,10 @@ Item {
to: 50
value: Settings.data.brightness.brightnessStep
stepSize: 1
onMoved: {
Settings.data.brightness.brightnessStep = value
onPressedChanged: {
if (!pressed) {
Settings.data.brightness.brightnessStep = value
}
}
}

View file

@ -204,6 +204,8 @@ Singleton {
}
}
function getStoredBrightness(): real {
// Try to get stored brightness for this specific monitor
var stored = Settings.data.brightness.monitorBrightness.find(m => m.name === modelData.name)
@ -283,6 +285,8 @@ Singleton {
initProc.running = true
}
onBusNumChanged: initBrightness()
Component.onCompleted: initBrightness()
}

View file

@ -214,6 +214,8 @@ QtObject {
scanProcess.existingNetwork = {}
}
}
}
property Process connectProcess: Process {

View file

@ -24,6 +24,9 @@ Singleton {
// Used to access via Settings.data.xxx.yyy
property var data: adapter
// Flag to prevent unnecessary wallpaper calls during reloads
property bool isInitialLoad: true
// Needed to only have one NPanel loaded at a time. <--- VERY BROKEN
//property var openPanel: null
@ -47,10 +50,12 @@ Singleton {
onLoaded: function () {
console.log("[Settings] Loaded")
Qt.callLater(function () {
if (adapter.wallpaper.current !== "") {
// Only set wallpaper on initial load, not on reloads
if (isInitialLoad && adapter.wallpaper.current !== "") {
console.log("[Settings] Set current wallpaper", adapter.wallpaper.current)
Wallpapers.setCurrentWallpaper(adapter.wallpaper.current, true)
}
isInitialLoad = false
})
}
onLoadFailed: function (error) {

View file

@ -39,6 +39,8 @@ Singleton {
}
function setCurrentWallpaper(path, isInitial) {
// Only generate colors if the wallpaper actually changed
var wallpaperChanged = currentWallpaper !== path
currentWallpaper = path
if (!isInitial) {
@ -62,7 +64,10 @@ Singleton {
randomWallpaperTimer.restart()
}
generateColors()
// Only generate colors if the wallpaper actually changed
if (wallpaperChanged) {
generateColors()
}
}
function setRandomWallpaper() {
@ -91,7 +96,9 @@ Singleton {
}
function generateColors() {
console.log("[Wallpapers] generateColors() called, generateColors setting:", Settings.data.wallpaper.generateColors)
if (Settings.data.wallpaper.generateColors) {
console.log("[Wallpapers] Starting color generation process")
generateThemeProcess.running = true
}
}