summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@ymail.com>2022-04-11 04:18:16 +0200
committerNicolas Werner <nicolas.werner@ymail.com>2022-04-23 03:10:25 +0200
commitc775a93f775dafcd53bce580f9c856eab4a17978 (patch)
tree2c36ca3f5c81523e422f5eaf68e4da64276da84b
parent730327579399c62353fdbea492c067d816b08ec0 (diff)
Fix some qt6 issues
-rw-r--r--resources/qml/Avatar.qml6
-rw-r--r--resources/qml/ChatPage.qml2
-rw-r--r--resources/qml/CommunitiesList.qml36
-rw-r--r--resources/qml/Completer.qml31
-rw-r--r--resources/qml/ElidedLabel.qml2
-rw-r--r--resources/qml/EncryptionIndicator.qml2
-rw-r--r--resources/qml/ForwardCompleter.qml12
-rw-r--r--resources/qml/ImageButton.qml4
-rw-r--r--resources/qml/MatrixText.qml2
-rw-r--r--resources/qml/MatrixTextField.qml12
-rw-r--r--resources/qml/MessageInput.qml12
-rw-r--r--resources/qml/MessageView.qml35
-rw-r--r--resources/qml/NhekoBusyIndicator.qml2
-rw-r--r--resources/qml/NotificationWarning.qml2
-rw-r--r--resources/qml/QuickSwitcher.qml4
-rw-r--r--resources/qml/Reactions.qml16
-rw-r--r--resources/qml/ReplyPopup.qml6
-rw-r--r--resources/qml/RoomList.qml51
-rw-r--r--resources/qml/Root.qml4
-rw-r--r--resources/qml/ScrollHelper.qml97
-rw-r--r--resources/qml/SelfVerificationCheck.qml22
-rw-r--r--resources/qml/TimelineRow.qml16
-rw-r--r--resources/qml/TimelineView.qml8
-rw-r--r--resources/qml/TopBar.qml24
-rw-r--r--resources/qml/TypingIndicator.qml6
-rw-r--r--resources/qml/UploadBox.qml6
-rw-r--r--resources/qml/components/AvatarListTile.qml30
-rw-r--r--resources/qml/components/FlatButton.qml4
-rw-r--r--resources/qml/components/MainWindowDialog.qml2
-rw-r--r--resources/qml/components/TextButton.qml4
-rw-r--r--resources/qml/delegates/Encrypted.qml6
-rw-r--r--resources/qml/delegates/FileMessage.qml8
-rw-r--r--resources/qml/delegates/ImageMessage.qml8
-rw-r--r--resources/qml/delegates/MessageDelegate.qml6
-rw-r--r--resources/qml/delegates/NoticeMessage.qml2
-rw-r--r--resources/qml/delegates/Pill.qml4
-rw-r--r--resources/qml/delegates/Placeholder.qml2
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml6
-rw-r--r--resources/qml/delegates/Redacted.qml6
-rw-r--r--resources/qml/delegates/Reply.qml6
-rw-r--r--resources/qml/delegates/TextMessage.qml12
-rw-r--r--resources/qml/device-verification/DeviceVerification.qml4
-rw-r--r--resources/qml/device-verification/DigitVerification.qml10
-rw-r--r--resources/qml/device-verification/EmojiVerification.qml8
-rw-r--r--resources/qml/device-verification/Failed.qml4
-rw-r--r--resources/qml/device-verification/NewVerificationRequest.qml4
-rw-r--r--resources/qml/device-verification/Success.qml4
-rw-r--r--resources/qml/device-verification/Waiting.qml6
-rw-r--r--resources/qml/dialogs/CreateDirect.qml6
-rw-r--r--resources/qml/dialogs/CreateRoom.qml10
-rw-r--r--resources/qml/dialogs/ImagePackEditorDialog.qml25
-rw-r--r--resources/qml/dialogs/ImagePackSettingsDialog.qml32
-rw-r--r--resources/qml/dialogs/InputDialog.qml2
-rw-r--r--resources/qml/dialogs/InviteDialog.qml12
-rw-r--r--resources/qml/dialogs/JoinRoomDialog.qml6
-rw-r--r--resources/qml/dialogs/PhoneNumberInputDialog.qml2
-rw-r--r--resources/qml/dialogs/RawMessageDialog.qml10
-rw-r--r--resources/qml/dialogs/ReadReceipts.qml14
-rw-r--r--resources/qml/dialogs/RoomDirectory.qml21
-rw-r--r--resources/qml/dialogs/RoomMembers.qml15
-rw-r--r--resources/qml/dialogs/RoomSettings.qml39
-rw-r--r--resources/qml/dialogs/UserProfile.qml21
-rw-r--r--resources/qml/emoji/EmojiPicker.qml31
-rw-r--r--resources/qml/emoji/StickerPicker.qml25
-rw-r--r--resources/qml/pages/LoginPage.qml6
-rw-r--r--resources/qml/pages/RegisterPage.qml8
-rw-r--r--resources/qml/pages/UserSettingsPage.qml10
-rw-r--r--resources/qml/pages/WelcomePage.qml4
-rw-r--r--resources/qml/ui/NhekoSlider.qml4
-rw-r--r--resources/qml/ui/Snackbar.qml4
-rw-r--r--resources/qml/ui/media/MediaControls.qml8
-rw-r--r--resources/qml/voip/CallDevices.qml10
-rw-r--r--resources/qml/voip/CallInvite.qml16
-rw-r--r--resources/qml/voip/CallInviteBar.qml4
-rw-r--r--resources/qml/voip/DeviceError.qml8
-rw-r--r--resources/qml/voip/PlaceCall.qml12
-rw-r--r--resources/qml/voip/ScreenShare.qml12
-rw-r--r--resources/res.qrc1
-rw-r--r--src/MxcImageProvider.cpp3
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