diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-02 01:29:05 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-08 22:32:07 +0200 |
commit | 54e2295c214874a316d22eaedaf5c2db17b59df0 (patch) | |
tree | 2c88e09be38e2758dfcd3fe6732da484f99d94c5 | |
parent | e85a1d4aeb464f155cf026d33cab120f07724e70 (diff) |
Fix palette access and QMediaPlayer errors
88 files changed, 426 insertions, 480 deletions
diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index 4951a9fb..8302f8fa 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -24,7 +24,7 @@ AbstractButton { background: Rectangle { id: bg radius: Settings.avatarCircles ? height / 2 : height / 8 - color: Nheko.colors.alternateBase + color: palette.alternateBase } Label { @@ -39,7 +39,7 @@ AbstractButton { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter visible: img.status != Image.Ready && !Settings.useIdenticon - color: Nheko.colors.text + color: palette.text } Image { @@ -109,7 +109,7 @@ AbstractButton { } Ripple { - color: Qt.rgba(Nheko.colors.alternateBase.r, Nheko.colors.alternateBase.g, Nheko.colors.alternateBase.b, 0.5) + color: Qt.rgba(palette.alternateBase.r, palette.alternateBase.g, palette.alternateBase.b, 0.5) } } diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml index d4d2b845..564c093d 100644 --- a/resources/qml/ChatPage.qml +++ b/resources/qml/ChatPage.qml @@ -14,7 +14,7 @@ import QtQml 2.15 Rectangle { id: chatPage - color: Nheko.colors.window + color: palette.window ColumnLayout { spacing: 0 diff --git a/resources/qml/CommunitiesList.qml b/resources/qml/CommunitiesList.qml index ee49ae2d..5bf239a6 100644 --- a/resources/qml/CommunitiesList.qml +++ b/resources/qml/CommunitiesList.qml @@ -78,11 +78,11 @@ Page { delegate: ItemDelegate { id: communityItem - property color backgroundColor: Nheko.colors.window - property color importantText: Nheko.colors.text - property color unimportantText: Nheko.colors.buttonText - property color bubbleBackground: Nheko.colors.highlight - property color bubbleText: Nheko.colors.highlightedText + property color backgroundColor: palette.window + property color importantText: palette.text + property color unimportantText: palette.buttonText + property color bubbleBackground: palette.highlight + property color bubbleText: palette.highlightedText required property var model height: avatarSize + 2 * Nheko.paddingMedium @@ -100,11 +100,11 @@ Page { PropertyChanges { target: communityItem - backgroundColor: Nheko.colors.dark - importantText: Nheko.colors.brightText - unimportantText: Nheko.colors.brightText - bubbleBackground: Nheko.colors.highlight - bubbleText: Nheko.colors.highlightedText + backgroundColor: palette.dark + importantText: palette.brightText + unimportantText: palette.brightText + bubbleBackground: palette.highlight + bubbleText: palette.highlightedText } }, @@ -114,11 +114,11 @@ Page { PropertyChanges { target: communityItem - backgroundColor: Nheko.colors.highlight - importantText: Nheko.colors.highlightedText - unimportantText: Nheko.colors.highlightedText - bubbleBackground: Nheko.colors.highlightedText - bubbleText: Nheko.colors.highlight + backgroundColor: palette.highlight + importantText: palette.highlightedText + unimportantText: palette.highlightedText + bubbleBackground: palette.highlightedText + bubbleText: palette.highlight } } diff --git a/resources/qml/Completer.qml b/resources/qml/Completer.qml index 0a9c41ed..95bebc1b 100644 --- a/resources/qml/Completer.qml +++ b/resources/qml/Completer.qml @@ -127,8 +127,8 @@ Control { ListView.delayRemove: true - color: model.index == popup.currentIndex ? Nheko.colors.highlight : Nheko.colors.base - height: chooser.child.implicitHeight + 2 * popup.rowMargin + color: model.index == popup.currentIndex ? palette.highlight : palette.base + height: (chooser.child?.implicitHeight ?? 0) + 2 * popup.rowMargin implicitWidth: fullWidth ? ListView.view.width : chooser.child.implicitWidth + 4 MouseArea { @@ -146,7 +146,7 @@ Control { } } Ripple { - color: Qt.rgba(Nheko.colors.base.r, Nheko.colors.base.g, Nheko.colors.base.b, 0.5) + color: Qt.rgba(palette.base.r, palette.base.g, palette.base.b, 0.5) } DelegateChooser { @@ -177,12 +177,12 @@ Control { Label { text: model.displayName - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? palette.highlightedText : palette.text } Label { text: "(" + model.userid + ")" - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText + color: model.index == popup.currentIndex ? palette.highlightedText : palette.buttonText } } @@ -201,7 +201,7 @@ Control { Label { visible: !!model.unicode text: model.unicode - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? palette.highlightedText : palette.text font: Settings.emojiFont } @@ -220,12 +220,12 @@ Control { Layout.leftMargin: Nheko.paddingSmall Layout.rightMargin: Nheko.paddingSmall text: model.shortcode - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? palette.highlightedText : palette.text } Label { text: "(" + model.packname + ")" - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText + color: model.index == popup.currentIndex ? palette.highlightedText : palette.buttonText } } @@ -243,13 +243,13 @@ Control { Label { text: model.name - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? palette.highlightedText : palette.text font.bold: true } Label { text: model.description - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText + color: model.index == popup.currentIndex ? palette.highlightedText : palette.buttonText } } @@ -277,7 +277,7 @@ Control { Label { text: model.roomName font.pixelSize: popup.avatarHeight * 0.5 - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? palette.highlightedText : palette.text font.italic: model.isTombstoned textFormat: Text.RichText } @@ -306,14 +306,14 @@ Control { Label { text: model.roomName - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? palette.highlightedText : palette.text font.italic: model.isTombstoned textFormat: Text.RichText } Label { text: "(" + model.roomAlias + ")" - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText + color: model.index == popup.currentIndex ? palette.highlightedText : palette.buttonText textFormat: Text.RichText } @@ -329,8 +329,8 @@ Control { background: Rectangle { - color: Nheko.colors.base - border.color: Nheko.colors.mid + color: palette.base + border.color: palette.mid } } diff --git a/resources/qml/ElidedLabel.qml b/resources/qml/ElidedLabel.qml index 180259b1..2d53faff 100644 --- a/resources/qml/ElidedLabel.qml +++ b/resources/qml/ElidedLabel.qml @@ -13,7 +13,7 @@ Label { property alias elideWidth: metrics.elideWidth property int fullTextWidth: Math.ceil(metrics.advanceWidth) - color: Nheko.colors.text + color: palette.text text: (textFormat == Text.PlainText) ? metrics.elidedText : TimelineManager.escapeEmoji(metrics.elidedText) maximumLineCount: 1 elide: Text.ElideRight diff --git a/resources/qml/EncryptionIndicator.qml b/resources/qml/EncryptionIndicator.qml index 5338b6be..c675fb52 100644 --- a/resources/qml/EncryptionIndicator.qml +++ b/resources/qml/EncryptionIndicator.qml @@ -43,7 +43,7 @@ Image { case Crypto.Verified: return sourceUrl + Nheko.theme.green; case Crypto.TOFU: - return sourceUrl + Nheko.colors.buttonText; + return sourceUrl + palette.buttonText; default: return sourceUrl + Nheko.theme.error; } diff --git a/resources/qml/ForwardCompleter.qml b/resources/qml/ForwardCompleter.qml index 4ab23a4f..a5787189 100644 --- a/resources/qml/ForwardCompleter.qml +++ b/resources/qml/ForwardCompleter.qml @@ -19,7 +19,6 @@ Popup { x: Math.round(parent.width / 2 - width / 2) y: Math.round(parent.height / 4) modal: true - palette: Nheko.colors parent: Overlay.overlay width: timelineRoot.width * 0.8 leftPadding: 10 @@ -39,7 +38,7 @@ Popup { text: qsTr("Forward Message") font.bold: true bottomPadding: 10 - color: Nheko.colors.text + color: palette.text } Reply { @@ -50,7 +49,7 @@ Popup { width: parent.width - userColor: TimelineManager.userColor(modelData.userId, Nheko.colors.window) + userColor: TimelineManager.userColor(modelData.userId, palette.window) blurhash: modelData.blurhash ?? "" body: modelData.body ?? "" formattedBody: modelData.formattedBody ?? "" @@ -72,7 +71,7 @@ Popup { id: roomTextInput width: forwardMessagePop |