Post refactoring fixes 2/?

This commit is contained in:
quadbyte 2025-08-15 22:06:39 -04:00
parent 4631239b92
commit 258bb37533
10 changed files with 14 additions and 19 deletions

View file

@ -75,7 +75,6 @@ Singleton {
property bool showActiveWindow: true
property bool showSystemInfo: false
property bool showMedia: false
property bool showTaskbar: false
property list<string> monitors: []
}

View file

@ -5,6 +5,7 @@ import qs.Commons
import qs.Services
import qs.Widgets
Row {
id: layout
anchors.verticalCenter: parent.verticalCenter
@ -27,7 +28,7 @@ Row {
// Update text when window changes
Connections {
target: typeof Niri !== "undefined" ? Niri : null
target: typeof NiriService !== "undefined" ? NiriService : null
function onFocusedWindowIndexChanged() {
// Check if window actually changed
if (NiriService.focusedWindowIndex !== lastWindowIndex) {
@ -92,13 +93,13 @@ Row {
function getDisplayText() {
// Check if Niri service is available
if (typeof Niri === "undefined") {
if (typeof NiriService === "undefined") {
return ""
}
// Get the focused window data
const focusedWindow = NiriService.focusedWindowIndex >= 0
&& NiriService.focusedWindowIndex < NiriService.windows.length ? NiriService.windows[NiriService.focusedWindowIndex] : null
const focusedWindow = NiriService.focusedWindowIndex >= 0 && NiriService.focusedWindowIndex
< NiriService.windows.length ? NiriService.windows[NiriService.focusedWindowIndex] : null
if (!focusedWindow) {
return ""

View file

@ -294,8 +294,8 @@ NLoader {
}
NText {
visible: NetworkService.connectStatusSsid === modelData.ssid && NetworkService.connectStatus === "error"
&& network.connectError.length > 0
visible: NetworkService.connectStatusSsid === modelData.ssid
&& NetworkService.connectStatus === "error" && network.connectError.length > 0
text: NetworkService.connectError
color: Colors.mError
font.pointSize: Style.fontSizeSmall * scaling

View file

@ -58,15 +58,6 @@ ColumnLayout {
}
}
NToggle {
label: "Show Taskbar"
description: "Display a taskbar showing currently open windows"
value: Settings.data.bar.showTaskbar
onToggled: function (newValue) {
Settings.data.bar.showTaskbar = newValue
}
}
NToggle {
label: "Show Media"
description: "Display media controls and information"

View file

@ -107,7 +107,8 @@ Item {
Item {
Layout.fillWidth: true
Layout.preferredHeight: {
return Math.ceil(WallpapersService.wallpaperList.length / wallpaperGridView.columns) * wallpaperGridView.cellHeight
return Math.ceil(
WallpapersService.wallpaperList.length / wallpaperGridView.columns) * wallpaperGridView.cellHeight
}
GridView {

View file

@ -27,7 +27,8 @@ NBox {
RowLayout {
spacing: Style.marginSmall * scaling
NText {
text: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode) : ""
text: weatherReady ? LocationService.weatherSymbolFromCode(
LocationService.data.weather.current_weather.weathercode) : ""
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXXL * 1.5 * scaling
color: Colors.mPrimary

View file

@ -4,6 +4,7 @@ import QtQuick
import Qt.labs.folderlistmodel
import Quickshell
import Quickshell.Io
import qs.Commons
Singleton {
id: root

View file

@ -34,7 +34,7 @@ Singleton {
}
if (typeof Niri !== "undefined") {
if (typeof NiriService !== "undefined") {
isHyprland = false
isNiri = true
initNiri()

View file

@ -11,6 +11,7 @@ import qs.Modules.Bar
import qs.Modules.Calendar
import qs.Modules.Demo
import qs.Modules.Dock
import qs.Modules.IPC
import qs.Modules.LockScreen
import qs.Modules.Notification
import qs.Modules.SettingsPanel