1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-10 07:25:37 -05:00

Fix warnings

This commit is contained in:
purian23
2025-09-03 23:58:53 -04:00
parent 998d390161
commit 9e0693ca8c
2 changed files with 16 additions and 2 deletions

View File

@@ -28,7 +28,9 @@ Rectangle {
onActivePlayerChanged: {
if (activePlayer && activePlayer.positionSupported) {
currentPosition = Qt.binding(() => activePlayer?.position)
currentPosition = Qt.binding(() => activePlayer?.position || 0)
} else {
currentPosition = 0
}
}

View File

@@ -146,7 +146,6 @@ PanelWindow {
TextArea {
id: textArea
text: SessionData.notepadContent
placeholderText: qsTr("Start typing your notes here...")
font.family: SettingsData.monoFontFamily
font.pixelSize: Theme.fontSizeMedium
@@ -164,6 +163,19 @@ PanelWindow {
rightPadding: Theme.spacingM
bottomPadding: Theme.spacingM
Component.onCompleted: {
text = SessionData.notepadContent
}
Connections {
target: SessionData
function onNotepadContentChanged() {
if (textArea.text !== SessionData.notepadContent) {
textArea.text = SessionData.notepadContent
}
}
}
onTextChanged: {
if (text !== SessionData.notepadContent) {
SessionData.notepadContent = text