Replaced all NWidgets callback by proper signals

This commit is contained in:
quadbyte 2025-08-12 13:22:15 -04:00
parent 1a7a0dbb16
commit a7d4e0ec1d
27 changed files with 93 additions and 88 deletions

View file

@ -60,7 +60,7 @@ NLoader {
"source": "Tabs/About.qml"
}]
onVisibleChanged: function () {
onVisibleChanged: {
if (visible)
currentTabIndex = 0
}
@ -188,7 +188,7 @@ NLoader {
icon: "close"
tooltipText: "Close settings panel"
Layout.alignment: Qt.AlignVCenter
onClicked: function () {
onClicked: {
settingsWindow.isLoaded = !settingsWindow.isLoaded
}
}

View file

@ -84,7 +84,7 @@ ColumnLayout {
text: Settings.data.general.avatarImage
placeholderText: "/home/user/.face"
Layout.fillWidth: true
onEditingFinished: function () {
onEditingFinished: {
Settings.data.general.avatarImage = text
}
}

View file

@ -65,7 +65,7 @@ ColumnLayout {
NTextInput {
text: Settings.data.screenRecorder.directory
Layout.fillWidth: true
onEditingFinished: function () {
onEditingFinished: {
Settings.data.screenRecorder.directory = text
}
}

View file

@ -58,7 +58,7 @@ ColumnLayout {
text: Settings.data.location.name
placeholderText: "Enter city name"
Layout.fillWidth: true
onEditingFinished: function () {
onEditingFinished: {
Settings.data.location.name = text
}
}

View file

@ -70,7 +70,7 @@ ColumnLayout {
NTextInput {
text: Settings.data.wallpaper.directory
Layout.fillWidth: true
onEditingFinished: function () {
onEditingFinished: {
Settings.data.wallpaper.directory = text
}
}

View file

@ -83,9 +83,8 @@ Item {
}
NText {
text: Settings.data.wallpaper.swww.enabled ?
"Wallpapers will change with " + Settings.data.wallpaper.swww.transitionType + " transition" :
"Wallpapers will change instantly"
text: Settings.data.wallpaper.swww.enabled ? "Wallpapers will change with " + Settings.data.wallpaper.swww.transitionType
+ " transition" : "Wallpapers will change instantly"
color: Colors.textSecondary
font.pointSize: Style.fontSizeSmall * scaling
visible: Settings.data.wallpaper.swww.enabled
@ -128,13 +127,13 @@ Item {
anchors.fill: parent
clip: true
model: folderModel
// Fixed 5 items per row - more aggressive sizing
property int itemSize: Math.floor((width - leftMargin - rightMargin - (4 * Style.marginSmall * scaling)) / 5)
cellWidth: Math.floor((width - leftMargin - rightMargin) / 5)
cellHeight: Math.floor(itemSize * 0.67) + Style.marginSmall * scaling
leftMargin: Style.marginSmall * scaling
rightMargin: Style.marginSmall * scaling
topMargin: Style.marginSmall * scaling
@ -191,9 +190,11 @@ Item {
color: Colors.textPrimary
opacity: mouseArea.containsMouse ? 0.1 : 0
radius: parent.radius
Behavior on opacity {
NumberAnimation { duration: 150 }
NumberAnimation {
duration: 150
}
}
}
@ -249,4 +250,4 @@ Item {
}
}
}
}
}