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 showActiveWindow: true
property bool showSystemInfo: false property bool showSystemInfo: false
property bool showMedia: false property bool showMedia: false
property bool showTaskbar: false
property list<string> monitors: [] property list<string> monitors: []
} }

View file

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

View file

@ -294,8 +294,8 @@ NLoader {
} }
NText { NText {
visible: NetworkService.connectStatusSsid === modelData.ssid && NetworkService.connectStatus === "error" visible: NetworkService.connectStatusSsid === modelData.ssid
&& network.connectError.length > 0 && NetworkService.connectStatus === "error" && network.connectError.length > 0
text: NetworkService.connectError text: NetworkService.connectError
color: Colors.mError color: Colors.mError
font.pointSize: Style.fontSizeSmall * scaling 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 { NToggle {
label: "Show Media" label: "Show Media"
description: "Display media controls and information" description: "Display media controls and information"

View file

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

View file

@ -27,7 +27,8 @@ NBox {
RowLayout { RowLayout {
spacing: Style.marginSmall * scaling spacing: Style.marginSmall * scaling
NText { 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.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXXL * 1.5 * scaling font.pointSize: Style.fontSizeXXL * 1.5 * scaling
color: Colors.mPrimary color: Colors.mPrimary

View file

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

View file

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

View file

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