diff options
author | Nicolas Werner <nicolas.werner@ymail.com> | 2022-04-11 04:18:16 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@ymail.com> | 2022-04-23 03:10:25 +0200 |
commit | c775a93f775dafcd53bce580f9c856eab4a17978 (patch) | |
tree | 2c36ca3f5c81523e422f5eaf68e4da64276da84b | |
parent | 730327579399c62353fdbea492c067d816b08ec0 (diff) |
Fix some qt6 issues
79 files changed, 388 insertions, 559 deletions
diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index 09529fcd..593decb7 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -25,7 +25,7 @@ AbstractButton { background: Rectangle { id: bg radius: Settings.avatarCircles ? height / 2 : height / 8 - color: Nheko.colors.alternateBase + color: timelineRoot.palette.alternateBase } Label { @@ -40,7 +40,7 @@ AbstractButton { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter visible: img.status != Image.Ready && !Settings.useIdenticon - color: Nheko.colors.text + color: timelineRoot.palette.text } Image { @@ -104,7 +104,7 @@ AbstractButton { } Ripple { - color: Qt.rgba(Nheko.colors.alternateBase.r, Nheko.colors.alternateBase.g, Nheko.colors.alternateBase.b, 0.5) + color: Qt.rgba(timelineRoot.palette.alternateBase.r, timelineRoot.palette.alternateBase.g, timelineRoot.palette.alternateBase.b, 0.5) } } diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml index c39f442e..559fbc11 100644 --- a/resources/qml/ChatPage.qml +++ b/resources/qml/ChatPage.qml @@ -15,7 +15,7 @@ import QtQml 2.15 Rectangle { id: chatPage - color: Nheko.colors.window + color: timelineRoot.palette.window ColumnLayout { spacing: 0 diff --git a/resources/qml/CommunitiesList.qml b/resources/qml/CommunitiesList.qml index 61287789..64929e17 100644 --- a/resources/qml/CommunitiesList.qml +++ b/resources/qml/CommunitiesList.qml @@ -26,12 +26,6 @@ Page { height: parent.height model: Communities.filtered() - ScrollHelper { - flickable: parent - anchors.fill: parent - enabled: !Settings.mobileMode - } - Platform.Menu { id: communityContextMenu @@ -52,11 +46,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: timelineRoot.palette.window + property color importantText: timelineRoot.palette.text + property color unimportantText: timelineRoot.palette.buttonText + property color bubbleBackground: timelineRoot.palette.highlight + property color bubbleText: timelineRoot.palette.highlightedText height: avatarSize + 2 * Nheko.paddingMedium width: ListView.view.width @@ -73,11 +67,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: timelineRoot.palette.dark + importantText: timelineRoot.palette.brightText + unimportantText: timelineRoot.palette.brightText + bubbleBackground: timelineRoot.palette.highlight + bubbleText: timelineRoot.palette.highlightedText } }, @@ -87,11 +81,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: timelineRoot.palette.highlight + importantText: timelineRoot.palette.highlightedText + unimportantText: timelineRoot.palette.highlightedText + bubbleBackground: timelineRoot.palette.highlightedText + bubbleText: timelineRoot.palette.highlight } } diff --git a/resources/qml/Completer.qml b/resources/qml/Completer.qml index a16ffa65..d173de87 100644 --- a/resources/qml/Completer.qml +++ b/resources/qml/Completer.qml @@ -93,11 +93,6 @@ Control { // that until we find something better. Put is all together and you have the formula below! implicitHeight: Math.min(contentHeight, 6*rowSpacing + 7*(popup.avatarHeight + 2*rowMargin)) clip: true - ScrollHelper { - flickable: parent - anchors.fill: parent - enabled: !Settings.mobileMode - } Timer { id: deadTimer @@ -117,7 +112,7 @@ Control { delegate: Rectangle { property variant modelData: model - color: model.index == popup.currentIndex ? Nheko.colors.highlight : Nheko.colors.base + color: model.index == popup.currentIndex ? timelineRoot.palette.highlight : timelineRoot.palette.base height: chooser.child.implicitHeight + 2 * popup.rowMargin implicitWidth: fullWidth ? ListView.view.width : chooser.child.implicitWidth + 4 @@ -134,7 +129,7 @@ Control { } } Ripple { - color: Qt.rgba(Nheko.colors.base.r, Nheko.colors.base.g, Nheko.colors.base.b, 0.5) + color: Qt.rgba(timelineRoot.palette.base.r, timelineRoot.palette.base.g, timelineRoot.palette.base.b, 0.5) } DelegateChooser { @@ -165,12 +160,12 @@ Control { Label { text: model.displayName - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.text } Label { text: "(" + model.userid + ")" - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.buttonText } } @@ -188,13 +183,13 @@ Control { Label { text: model.unicode - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.text font: Settings.emojiFont } Label { text: model.shortName - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.text } } @@ -222,12 +217,12 @@ Control { Label { text: model.shortcode - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.text } Label { text: "(" + model.packname + ")" - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.buttonText } } @@ -258,7 +253,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 ? timelineRoot.palette.highlightedText : timelineRoot.palette.text textFormat: Text.RichText } @@ -286,13 +281,13 @@ Control { Label { text: model.roomName - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.text + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.text textFormat: Text.RichText } Label { text: "(" + model.roomAlias + ")" - color: model.index == popup.currentIndex ? Nheko.colors.highlightedText : Nheko.colors.buttonText + color: model.index == popup.currentIndex ? timelineRoot.palette.highlightedText : timelineRoot.palette.buttonText textFormat: Text.RichText } @@ -308,8 +303,8 @@ Control { background: Rectangle { - color: Nheko.colors.base - border.color: Nheko.colors.mid + color: timelineRoot.palette.base + border.color: timelineRoot.palette.mid } } diff --git a/resources/qml/ElidedLabel.qml b/resources/qml/ElidedLabel.qml index 11df479a..f5d10a21 100644 --- a/resources/qml/ElidedLabel.qml +++ b/resources/qml/ElidedLabel.qml @@ -14,7 +14,7 @@ Label { property alias elideWidth: metrics.elideWidth property int fullTextWidth: Math.ceil(metrics.advanceWidth) - color: Nheko.colors.text + color: timelineRoot.palette.text text: (textFormat == Text.PlainText) ? metrics.elidedText : TimelineManager.escapeEmoji(TimelineManager.htmlEscape(metrics.elidedText)) maximumLineCount: 1 elide: Text.ElideRight diff --git a/resources/qml/EncryptionIndicator.qml b/resources/qml/EncryptionIndicator.qml index b0f479fa..0b8fe089 100644 --- a/resources/qml/EncryptionIndicator.qml +++ b/resources/qml/EncryptionIndicator.qml @@ -40,7 +40,7 @@ Image { case Crypto.Verified: return sourceUrl + "green"; case Crypto.TOFU: - return sourceUrl + Nheko.colors.buttonText; + return sourceUrl + timelineRoot.palette.buttonText; default: return sourceUrl + Nheko.theme.error; } diff --git a/resources/qml/ForwardCompleter.qml b/resources/qml/ForwardCompleter.qml index 76d77bfd..07a6c548 100644 --- a/resources/qml/ForwardCompleter.qml +++ b/resources/qml/ForwardCompleter.qml @@ -20,7 +20,7 @@ Popup { x: Math.round(parent.width / 2 - width / 2) y: Math.round(parent.height / 4) modal: true - palette: Nheko.colors + palette: timelineRoot.palette parent: Overlay.overlay width: timelineRoot.width * 0.8 leftPadding: 10 @@ -40,7 +40,7 @@ Popup { text: qsTr("Forward Message") font.bold: true bottomPadding: 10 - color: Nheko.colors.text + color: timelineRoot.palette.text } Reply { @@ -51,7 +51,7 @@ Popup { width: parent.width - userColor: TimelineManager.userColor(modelData.userId, Nheko.colors.window) + userColor: TimelineManager.userColor(modelData.userId, timelineRoot.palette.window) blurhash: modelData.blurhash ?? "" body: modelData.body ?? "" formattedBody: modelData.formattedBody ?? "" @@ -73,7 +73,7 @@ Popup { id: roomTextInput width: forwardMessagePopup.width - forwardMessagePopup.leftPadding * 2 - color: Nheko.colors.text + color: timelineRoot.palette.text onTextEdited: { completerPopup.completer.searchString = text; } @@ -124,11 +124,11 @@ Popup { } background: Rectangle { - color: Nheko.colors.window + color: timelineRoot.palette.window } Overlay.modal: Rectangle { - color: Qt.rgba(Nheko.colors.window.r, Nheko.colors.window.g, Nheko.colors.window.b, 0.7) + color: Qt.rgba(timelineRoot.palette.window.r, timelineRoot.palette.window.g, timelineRoot.palette.window.b, 0.7) } } diff --git a/resources/qml/ImageButton.qml b/resources/qml/ImageButton.qml index ffd3e920..b55c423e 100644 --- a/resources/qml/ImageButton.qml +++ b/resources/qml/ImageButton.qml @@ -13,8 +13,8 @@ AbstractButton { property alias cursor: mouseArea.cursorShape property string image: undefined - property color highlightColor: Nheko.colors.highlight - property color buttonTextColor: Nheko.colors.buttonText + property color highlightColor: timelineRoot.palette.highlight + pr |