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

This commit is contained in:
Ly-sec 2025-08-15 23:27:36 +02:00
commit 2629b4707d
3 changed files with 109 additions and 104 deletions

View file

@ -74,23 +74,21 @@ Row {
elide: Text.ElideRight
}
// Mouse area for hover detection
MouseArea {
id: titleContainerMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.IBeamCursor
onEntered: {
titleText.text = getDisplayText()
}
onExited: {
titleText.text = getDisplayText()
}
// Mouse area for hover detection
MouseArea {
id: titleContainerMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.IBeamCursor
onEntered: {
titleText.text = getDisplayText()
}
onExited: {
titleText.text = getDisplayText()
}
}
}
function getDisplayText() {
// Check if Niri service is available
if (typeof Niri === "undefined") {
@ -98,9 +96,8 @@ Row {
}
// Get the focused window data
const focusedWindow = Niri.focusedWindowIndex >= 0 && Niri.focusedWindowIndex < Niri.windows.length
? Niri.windows[Niri.focusedWindowIndex]
: null
const focusedWindow = Niri.focusedWindowIndex >= 0
&& Niri.focusedWindowIndex < Niri.windows.length ? Niri.windows[Niri.focusedWindowIndex] : null
if (!focusedWindow) {
return ""

View file

@ -59,9 +59,9 @@ ColumnLayout {
var component = Qt.createComponent("SchemeFileView.qml")
if (component.status === Component.Ready) {
var fileView = component.createObject(root, {
"path": schemePath,
"schemeName": schemeName
})
"path": schemePath,
"schemeName": schemeName
})
fileViews.push(fileView)
} else {
// Fallback: create inline FileView
@ -72,23 +72,23 @@ ColumnLayout {
function createInlineFileView(schemePath, schemeName) {
var fileViewQml = `
import QtQuick
import Quickshell.Io
import QtQuick
import Quickshell.Io
FileView {
property string schemeName: "${schemeName}"
path: "${schemePath}"
blockLoading: true
FileView {
property string schemeName: "${schemeName}"
path: "${schemePath}"
blockLoading: true
onLoaded: {
try {
var jsonData = JSON.parse(text())
root.schemeLoaded(schemeName, jsonData)
} catch (e) {
console.warn("Failed to parse JSON for scheme:", schemeName, e)
}
}
}
onLoaded: {
try {
var jsonData = JSON.parse(text())
root.schemeLoaded(schemeName, jsonData)
} catch (e) {
console.warn("Failed to parse JSON for scheme:", schemeName, e)
}
}
}
`
try {
@ -116,13 +116,13 @@ ColumnLayout {
} else {
// Default colors
colors = {
mPrimary: "#000000",
mSecondary: "#000000",
mTertiary: "#000000",
mError: "#ff0000",
mSurface: "#ffffff",
mOnSurface: "#000000",
mOutline: "#666666"
"mPrimary": "#000000",
"mSecondary": "#000000",
"mTertiary": "#000000",
"mError": "#ff0000",
"mSurface": "#ffffff",
"mOnSurface": "#000000",
"mOutline": "#666666"
}
}
@ -322,15 +322,22 @@ ColumnLayout {
// Smooth animations
Behavior on scale {
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
Behavior on border.color {
ColorAnimation { duration: 300 }
ColorAnimation {
duration: 300
}
}
Behavior on border.width {
NumberAnimation { duration: 200 }
NumberAnimation {
duration: 200
}
}
}
}

View file

@ -30,6 +30,7 @@ Singleton {
return
}
} catch (e) {
}
if (typeof Niri !== "undefined") {