mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Fix palette access and QMediaPlayer errors
This commit is contained in:
parent
e85a1d4aeb
commit
54e2295c21
88 changed files with 426 additions and 480 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import QtQml 2.15
|
|||
Rectangle {
|
||||
id: chatPage
|
||||
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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: forwardMessagePopup.width - forwardMessagePopup.leftPadding * 2
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
onTextEdited: {
|
||||
completerPopup.completer.searchString = text;
|
||||
}
|
||||
|
@ -123,11 +122,11 @@ Popup {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: 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(palette.window.r, palette.window.g, palette.window.b, 0.7)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,8 +12,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: palette.highlight
|
||||
property color buttonTextColor: palette.buttonText
|
||||
property bool changeColorOnHover: true
|
||||
property bool ripple: true
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ TextEdit {
|
|||
selectByMouse: !Settings.mobileMode
|
||||
// this always has to be enabled, otherwise you can't click links anymore!
|
||||
//enabled: selectByMouse
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
onLinkActivated: Nheko.openLink(link)
|
||||
ToolTip.visible: hoveredLink || false
|
||||
ToolTip.text: hoveredLink
|
||||
|
|
|
@ -10,7 +10,7 @@ import im.nheko 1.0
|
|||
|
||||
ColumnLayout {
|
||||
id: c
|
||||
property color backgroundColor: Nheko.colors.base
|
||||
property color backgroundColor: palette.base
|
||||
property alias color: labelC.color
|
||||
property alias textPadding: input.padding
|
||||
property alias text: input.text
|
||||
|
@ -61,8 +61,7 @@ ColumnLayout {
|
|||
y: contentHeight + input.padding + Nheko.paddingSmall
|
||||
enabled: false
|
||||
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
font.pixelSize: input.font.pixelSize
|
||||
font.weight: Font.DemiBold
|
||||
font.letterSpacing: input.font.pixelSize * 0.02
|
||||
|
@ -114,7 +113,6 @@ ColumnLayout {
|
|||
id: input
|
||||
Layout.fillWidth: true
|
||||
|
||||
palette: Nheko.colors
|
||||
color: labelC.color
|
||||
opacity: labelC.text ? 0 : 1
|
||||
focus: true
|
||||
|
@ -156,7 +154,7 @@ ColumnLayout {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
color: Nheko.colors.highlight
|
||||
color: palette.highlight
|
||||
height: 1
|
||||
|
||||
Rectangle {
|
||||
|
@ -166,7 +164,7 @@ ColumnLayout {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: parent.height*2
|
||||
width: 0
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
states: State {
|
||||
name: "focused"
|
||||
|
|
|
@ -16,7 +16,7 @@ Rectangle {
|
|||
|
||||
readonly property string text: messageInput.text
|
||||
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: row.implicitHeight
|
||||
Layout.minimumHeight: 40
|
||||
|
@ -90,7 +90,7 @@ Rectangle {
|
|||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
visible: room && room.input.uploading
|
||||
|
||||
Spinner {
|
||||
|
@ -144,8 +144,8 @@ Rectangle {
|
|||
|
||||
selectByMouse: true
|
||||
placeholderText: qsTr("Write a message...")
|
||||
placeholderTextColor: Nheko.colors.buttonText
|
||||
color: Nheko.colors.text
|
||||
placeholderTextColor: palette.buttonText
|
||||
color: palette.text
|
||||
width: textInput.width
|
||||
verticalAlignment: TextEdit.AlignVCenter
|
||||
wrapMode: TextEdit.Wrap
|
||||
|
@ -192,8 +192,8 @@ Rectangle {
|
|||
onSelectionStartChanged: room.input.updateState(selectionStart, selectionEnd, cursorPosition, text)
|
||||
onSelectionEndChanged: room.input.updateState(selectionStart, selectionEnd, cursorPosition, text)
|
||||
// Ensure that we get escape key press events first.
|
||||
Keys.onShortcutOverride: event.accepted = (popup.opened && (event.key === Qt.Key_Escape || event.key === Qt.Key_Tab || event.key === Qt.Key_Enter || event.key === Qt.Key_Space))
|
||||
Keys.onPressed: {
|
||||
Keys.onShortcutOverride: (event) => event.accepted = (popup.opened && (event.key === Qt.Key_Escape || event.key === Qt.Key_Tab || event.key === Qt.Key_Enter || event.key === Qt.Key_Space))
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.matches(StandardKey.Paste)) {
|
||||
event.accepted = room.input.tryPasteAttachment(false);
|
||||
} else if (event.key == Qt.Key_Space) {
|
||||
|
@ -438,7 +438,6 @@ Rectangle {
|
|||
StickerPicker {
|
||||
id: stickerPopup
|
||||
|
||||
colors: Nheko.colors
|
||||
emoji: false
|
||||
}
|
||||
|
||||
|
@ -463,7 +462,6 @@ Rectangle {
|
|||
StickerPicker {
|
||||
id: emojiPopup
|
||||
|
||||
colors: Nheko.colors
|
||||
emoji: true
|
||||
}
|
||||
}
|
||||
|
@ -489,7 +487,6 @@ Rectangle {
|
|||
anchors.centerIn: parent
|
||||
visible: room ? (!room.permissions.canSend(MtxEvent.TextMessage)) : false
|
||||
text: qsTr("You don't have permission to send messages in this room")
|
||||
color: Nheko.colors.text
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ Rectangle {
|
|||
implicitHeight: visible ? warningDisplay.implicitHeight + 4 * Nheko.paddingSmall : 0
|
||||
height: implicitHeight
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.window // required to hide the timeline behind this warning
|
||||
color: palette.window // required to hide the timeline behind this warning
|
||||
|
||||
Rectangle {
|
||||
id: warningRect
|
||||
|
@ -37,7 +37,6 @@ Rectangle {
|
|||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Nheko.paddingSmall
|
||||
color: Nheko.colors.text
|
||||
text: warningRoot.text
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ Item {
|
|||
z: 10
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
border.color: Nheko.colors.buttonText
|
||||
color: palette.window
|
||||
border.color: palette.buttonText
|
||||
border.width: 1
|
||||
radius: padding
|
||||
}
|
||||
|
@ -113,8 +113,8 @@ Item {
|
|||
|
||||
required property string modelData
|
||||
|
||||
property color highlightColor: Nheko.colors.highlight
|
||||
property color buttonTextColor: Nheko.colors.buttonText
|
||||
property color highlightColor: palette.highlight
|
||||
property color buttonTextColor: palette.buttonText
|
||||
property bool showImage: modelData.startsWith("mxc://")
|
||||
|
||||
//Layout.preferredHeight: fontMetrics.height
|
||||
|
@ -170,7 +170,7 @@ Item {
|
|||
|
||||
ImageButton {
|
||||
visible: !!row.model && row.model.isEditable
|
||||
buttonTextColor: Nheko.colors.buttonText
|
||||
buttonTextColor: palette.buttonText
|
||||
width: 16
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/edit.svg"
|
||||
|
@ -223,7 +223,7 @@ Item {
|
|||
|
||||
ImageButton {
|
||||
visible: !!row.model && filteredTimeline.filterByContent
|
||||
buttonTextColor: Nheko.colors.buttonText
|
||||
buttonTextColor: palette.buttonText
|
||||
width: 16
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/go-to.svg"
|
||||
|
@ -354,7 +354,7 @@ Item {
|
|||
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
|
||||
visible: room && previousMessageDay !== day
|
||||
text: room ? room.formatDateSeparator(timestamp) : ""
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
height: Math.round(fontMetrics.height * 1.4)
|
||||
width: contentWidth * 1.2
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
@ -362,7 +362,7 @@ Item {
|
|||
|
||||
background: Rectangle {
|
||||
radius: parent.height / 2
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ Item {
|
|||
contentItem: ElidedLabel {
|
||||
id: userName_
|
||||
fullText: userName
|
||||
color: TimelineManager.userColor(userId, Nheko.colors.base)
|
||||
color: TimelineManager.userColor(userId, palette.base)
|
||||
textFormat: Text.RichText
|
||||
elideWidth: Math.min(userInfo.remainingWidth-Math.min(statusMsg.implicitWidth,userInfo.remainingWidth/3), userName_.fullTextWidth)
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ Item {
|
|||
Label {
|
||||
id: statusMsg
|
||||
anchors.baseline: userNameButton.baseline
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
text: userStatus.replace(/\n/g, " ")
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
|
@ -580,7 +580,7 @@ Item {
|
|||
visible: true
|
||||
z: 1
|
||||
enabled: false
|
||||
color: Nheko.colors.highlight
|
||||
color: palette.highlight
|
||||
|
||||
states: State {
|
||||
name: "revealed"
|
||||
|
@ -646,7 +646,7 @@ Item {
|
|||
anchors.centerIn: parent
|
||||
anchors.margins: Nheko.paddingLarge
|
||||
running: (room && room.paginationInProgress) || chat.filteringInProgress
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
z: 3
|
||||
}
|
||||
|
||||
|
@ -892,9 +892,9 @@ Item {
|
|||
hoverEnabled: true
|
||||
|
||||
background: Rectangle {
|
||||
color: toEndButton.down ? Nheko.colors.highlight : Nheko.colors.button
|
||||
color: toEndButton.down ? palette.highlight : palette.button
|
||||
opacity: enabled ? 1 : 0.3
|
||||
border.color: toEndButton.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText
|
||||
border.color: toEndButton.hovered ? palette.highlight : palette.buttonText
|
||||
border.width: 1
|
||||
radius: toEndButton.radius
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ Item {
|
|||
id: buttonImg
|
||||
anchors.fill: parent
|
||||
anchors.margins: Nheko.paddingMedium
|
||||
source: "image://colorimage/:/icons/icons/ui/download.svg?" + (toEndButton.down ? Nheko.colors.highlightedText : Nheko.colors.buttonText)
|
||||
source: "image://colorimage/:/icons/icons/ui/download.svg?" + (toEndButton.down ? palette.highlightedText : palette.buttonText)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ Popup {
|
|||
modal: true
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
parent: Overlay.overlay
|
||||
palette: Nheko.colors
|
||||
onOpened: {
|
||||
roomTextInput.forceActiveFocus();
|
||||
}
|
||||
|
@ -35,7 +34,7 @@ Popup {
|
|||
|
||||
width: parent.width
|
||||
font.pixelSize: Math.ceil(quickSwitcher.textHeight * 0.6)
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
onTextEdited: {
|
||||
completerPopup.completer.searchString = text;
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ Flow {
|
|||
id: reactionFlow
|
||||
|
||||
// lower-contrast colors to avoid distracting from text & to enhance hover effect
|
||||
property color gentleHighlight: Qt.hsla(Nheko.colors.highlight.hslHue, Nheko.colors.highlight.hslSaturation, Nheko.colors.highlight.hslLightness, 0.8)
|
||||
property color gentleText: Qt.hsla(Nheko.colors.text.hslHue, Nheko.colors.text.hslSaturation, Nheko.colors.text.hslLightness, 0.6)
|
||||
property color gentleHighlight: Qt.hsla(palette.highlight.hslHue, palette.highlight.hslSaturation, palette.highlight.hslLightness, 0.8)
|
||||
property color gentleText: Qt.hsla(palette.text.hslHue, palette.text.hslSaturation, palette.text.hslLightness, 0.6)
|
||||
property string eventId
|
||||
property alias reactions: repeater.model
|
||||
|
||||
|
@ -69,7 +69,7 @@ Flow {
|
|||
return textMetrics.elidedText;
|
||||
}
|
||||
font.family: Settings.emojiFont
|
||||
color: (reaction.hovered || modelData.selfReactedEvent !== '') ? Nheko.colors.highlightedText: Nheko.colors.text
|
||||
color: (reaction.hovered || modelData.selfReactedEvent !== '') ? palette.highlightedText: palette.text
|
||||
maximumLineCount: 1
|
||||
visible: !modelData.key.startsWith("mxc://")
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ Flow {
|
|||
|
||||
height: Math.floor(reactionCounter.implicitHeight * 1.4)
|
||||
width: 1
|
||||
color: reaction.hovered ? Nheko.colors.text: gentleText
|
||||
color: reaction.hovered ? palette.text: gentleText
|
||||
}
|
||||
|
||||
Text {
|
||||
|
@ -96,7 +96,7 @@ Flow {
|
|||
anchors.verticalCenter: divider.verticalCenter
|
||||
text: modelData.count
|
||||
font: reaction.font
|
||||
color: (reaction.hovered || modelData.selfReactedEvent !== '') ? Nheko.colors.highlightedText: Nheko.colors.windowText
|
||||
color: (reaction.hovered || modelData.selfReactedEvent !== '') ? palette.highlightedText: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -105,8 +105,8 @@ Flow {
|
|||
anchors.centerIn: parent
|
||||
implicitWidth: reaction.implicitWidth
|
||||
implicitHeight: reaction.implicitHeight
|
||||
border.color: reaction.hovered ? Nheko.colors.text: gentleText
|
||||
color: reaction.hovered ? Nheko.colors.highlight : (modelData.selfReactedEvent !== '' ? gentleHighlight : Nheko.colors.window)
|
||||
border.color: reaction.hovered ? palette.text: gentleText
|
||||
color: reaction.hovered ? palette.highlight : (modelData.selfReactedEvent !== '' ? gentleHighlight : palette.window)
|
||||
border.width: 1
|
||||
radius: reaction.height / 2
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ Rectangle {
|
|||
visible: room && (room.reply || room.edit || room.thread)
|
||||
// Height of child, plus margins, plus border
|
||||
implicitHeight: (room && room.reply ? replyPreview.height : Math.max(closeEditButton.height, closeThreadButton.height)) + Nheko.paddingSmall
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
z: 3
|
||||
|
||||
Reply {
|
||||
|
@ -31,7 +31,7 @@ Rectangle {
|
|||
anchors.rightMargin: replyPopup.width < 450? 2*(22+16) : 3*(22+16)
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Nheko.paddingSmall
|
||||
userColor: TimelineManager.userColor(modelData.userId, Nheko.colors.window)
|
||||
userColor: TimelineManager.userColor(modelData.userId, palette.window)
|
||||
blurhash: modelData.blurhash ?? ""
|
||||
body: modelData.body ?? ""
|
||||
formattedBody: modelData.formattedBody ?? ""
|
||||
|
@ -46,7 +46,7 @@ Rectangle {
|
|||
isOnlyEmoji: modelData.isOnlyEmoji ?? false
|
||||
userId: modelData.userId ?? ""
|
||||
userName: modelData.userName ?? ""
|
||||
encryptionError: modelData.encryptionError ?? ""
|
||||
encryptionError: modelData.encryptionError ?? 0
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ Rectangle {
|
|||
anchors.margins: 8
|
||||
anchors.top: parent.top
|
||||
hoverEnabled: true
|
||||
buttonTextColor: room ? TimelineManager.userColor(room.thread, Nheko.colors.base) : Nheko.colors.buttonText
|
||||
buttonTextColor: room ? TimelineManager.userColor(room.thread, palette.base) : palette.buttonText
|
||||
image: ":/icons/icons/ui/dismiss_thread.svg"
|
||||
width: 22
|
||||
height: 22
|
||||
|
|
|
@ -97,8 +97,7 @@ Page {
|
|||
width: 420
|
||||
minimumWidth: 150
|
||||
minimumHeight: 150
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
title: room.plainRoomName
|
||||
//flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
|
@ -197,8 +196,8 @@ Page {
|
|||
|
||||
Instantiator {
|
||||
model: Communities.tagsWithDefault
|
||||
onObjectAdded: tagsMenu.insertItem(index, object)
|
||||
onObjectRemoved: tagsMenu.removeItem(object)
|
||||
onObjectAdded: (index, object) => tagsMenu.insertItem(index, object)
|
||||
onObjectRemoved: (index, object) => tagsMenu.removeItem(object)
|
||||
|
||||
delegate: Platform.MenuItem {
|
||||
property string t: modelData
|
||||
|
@ -241,11 +240,11 @@ Page {
|
|||
delegate: ItemDelegate {
|
||||
id: roomItem
|
||||
|
||||
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 string roomName
|
||||
required property string roomId
|
||||
required property string avatarUrl
|
||||
|
@ -261,7 +260,7 @@ Page {
|
|||
required property string directChatOtherUserId
|
||||
|
||||
Ripple {
|
||||
color: Qt.rgba(Nheko.colors.dark.r, Nheko.colors.dark.g, Nheko.colors.dark.b, 0.5)
|
||||
color: Qt.rgba(palette.dark.r, palette.dark.g, palette.dark.b, 0.5)
|
||||
}
|
||||
|
||||
height: avatarSize + 2 * Nheko.paddingMedium
|
||||
|
@ -290,11 +289,11 @@ Page {
|
|||
|
||||
PropertyChanges {
|
||||
target: roomItem
|
||||
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
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -304,11 +303,11 @@ Page {
|
|||
|
||||
PropertyChanges {
|
||||
target: roomItem
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -450,7 +449,7 @@ Page {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: parent.height - Nheko.paddingSmall * 2
|
||||
width: 3
|
||||
color: Nheko.colors.highlight
|
||||
color: palette.highlight
|
||||
visible: hasUnreadMessages
|
||||
}
|
||||
|
||||
|
@ -491,7 +490,7 @@ Page {
|
|||
padding: Nheko.paddingMedium
|
||||
Layout.minimumHeight: 40
|
||||
|
||||
background: Rectangle {color: Nheko.colors.window}
|
||||
background: Rectangle {color: palette.window}
|
||||
|
||||
InputDialog {
|
||||
id: statusDialog
|
||||
|
@ -572,7 +571,7 @@ Page {
|
|||
|
||||
ElidedLabel {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
font.pointSize: fontMetrics.font.pointSize * 0.9
|
||||
elideWidth: col.width
|
||||
fullText: userInfoGrid.profile ? userInfoGrid.profile.userid : ""
|
||||
|
@ -627,7 +626,7 @@ Page {
|
|||
|
||||
Layout.margins: Nheko.paddingMedium
|
||||
Layout.rightMargin: Nheko.paddingSmall
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
Layout.fillWidth: true
|
||||
text: {
|
||||
switch (SelfVerificationStatus.status) {
|
||||
|
@ -711,7 +710,7 @@ Page {
|
|||
horizontalPadding: Nheko.paddingMedium
|
||||
verticalPadding: 0
|
||||
|
||||
background: Rectangle {color: Nheko.colors.window}
|
||||
background: Rectangle {color: palette.window}
|
||||
contentItem: RowLayout {
|
||||
id: buttonRow
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ import im.nheko.EmojiModel 1.0
|
|||
Pane {
|
||||
id: timelineRoot
|
||||
|
||||
palette: Nheko.colors
|
||||
background: null
|
||||
padding: 0
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ Item {
|
|||
Layout.maximumWidth: (Overlay.overlay ? Overlay.overlay.width : 400) - Nheko.paddingMedium * 4
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("This is your recovery key. You will need it to restore access to your encrypted messages and verification keys. Keep this safe. Don't share it with anyone and don't lose it! Do not pass go! Do not collect $200!")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ Item {
|
|||
readOnly: true
|
||||
selectByMouse: true
|
||||
text: showRecoverKeyDialog.recoveryKey
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
font.bold: true
|
||||
wrapMode: TextEdit.Wrap
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ Item {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
border.color: Nheko.theme.separator
|
||||
border.width: 1
|
||||
radius: Nheko.paddingSmall
|
||||
|
@ -101,7 +101,7 @@ Item {
|
|||
Layout.columnSpan: 2
|
||||
font.pointSize: fontMetrics.font.pointSize * 2
|
||||
text: qsTr("Setup Encryption")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ Item {
|
|||
Layout.columnSpan: 2
|
||||
Layout.maximumWidth: grid.width - Nheko.paddingMedium * 2
|
||||
text: qsTr("Hello and welcome to Matrix!\nIt seems like you are new. Before you can securely encrypt your messages, we need to setup a few small things. You can either press accept immediately or adjust a few basic options. We also try to explain a few of the basics. You can skip those parts, but they might prove to be helpful!")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ Item {
|
|||
Layout.columnSpan: 1
|
||||
Layout.maximumWidth: Math.floor(grid.width / 2) - Nheko.paddingMedium * 2
|
||||
text: "Store secrets online.\nYou have a few secrets to make all the encryption magic work. While you can keep them stored only locally, we recommend storing them encrypted on the server. Otherwise it will be painful to recover them. Only disable this if you are paranoid and like losing your data!"
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ Item {
|
|||
Layout.maximumWidth: Math.floor(grid.width / 2) - Nheko.paddingMedium * 2
|
||||
visible: storeSecretsOnline.checked
|
||||
text: "Set an online backup password.\nWe recommend you DON'T set a password and instead only rely on the recovery key. You will get a recovery key in any case when storing the cross-signing secrets online, but passwords are usually not very random, so they are easier to attack than a completely random recovery key. If you choose to use a password, DON'T make it the same as your login password, otherwise your server can read all your encrypted messages. (You don't want that.)"
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ Item {
|
|||
Layout.columnSpan: 1
|
||||
Layout.maximumWidth: Math.floor(grid.width / 2) - Nheko.paddingMedium * 2
|
||||
text: "Use online key backup.\nStore the keys for your messages securely encrypted online. In general you do want this, because it protects your messages from becoming unreadable, if you log out by accident. It does however carry a small security risk, if you ever share your recovery key by accident. Currently this also has some other weaknesses, that might allow the server to insert new keys into your backup. The server will however never be able to read your messages."
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ Item {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
border.color: Nheko.theme.separator
|
||||
border.width: 1
|
||||
radius: Nheko.paddingSmall
|
||||
|
@ -235,7 +235,7 @@ Item {
|
|||
//Layout.columnSpan: 2
|
||||
font.pointSize: fontMetrics.font.pointSize * 2
|
||||
text: qsTr("Activate Encryption")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ Item {
|
|||
//Layout.columnSpan: 2
|
||||
Layout.maximumWidth: grid.width - Nheko.paddingMedium * 2
|
||||
text: qsTr("It seems like you have encryption already configured for this account. To be able to access your encrypted messages and make this device appear as trusted, you can either verify an existing device or (if you have one) enter your recovery passphrase. Please select one of the options below.\nIf you choose verify, you need to have the other device available. If you choose \"enter passphrase\", you will need your recovery key or passphrase. If you click cancel, you can choose to verify yourself at a later point.")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ AbstractButton {
|
|||
height: row.height+(reactionRow.height > 0 ? reactionRow.height-2 : 0 )+unreadRow.height
|
||||
|
||||
Rectangle {
|
||||
color: (Settings.messageHoverHighlight && hovered) ? Nheko.colors.alternateBase : "transparent"
|
||||
color: (Settings.messageHoverHighlight && hovered) ? palette.alternateBase : "transparent"
|
||||
anchors.fill: parent
|
||||
// this looks better without margins
|
||||
TapHandler {
|
||||
|
@ -112,7 +112,7 @@ AbstractButton {
|
|||
Rectangle {
|
||||
id: threadLine
|
||||
|
||||
color: TimelineManager.userColor(threadId, Nheko.colors.base)
|
||||
color: TimelineManager.userColor(threadId, palette.base)
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
|
@ -133,8 +133,8 @@ AbstractButton {
|
|||
width: Settings.bubbles? Math.min(maxWidth,Math.max(reply.implicitWidth+8,contentItem.implicitWidth+metadata.width+20)) : maxWidth
|
||||
height: msg.height+msg.anchors.margins*2
|
||||
|
||||
property color userColor: TimelineManager.userColor(userId, Nheko.colors.base)
|
||||
property color bgColor: Nheko.colors.base
|
||||
property color userColor: TimelineManager.userColor(userId, palette.base)
|
||||
property color bgColor: palette.base
|
||||
color: (Settings.bubbles && !isStateEvent) ? Qt.tint(bgColor, Qt.hsla(userColor.hslHue, 0.5, userColor.hslLightness, 0.2)) : "#00000000"
|
||||
radius: 4
|
||||
border.width: r.notificationlevel == MtxEvent.Highlight ? 1 : 0
|
||||
|
@ -169,7 +169,7 @@ AbstractButton {
|
|||
return replyTo != "" ? room.dataById(replyTo, role, r.eventId) : null;
|
||||
}
|
||||
visible: replyTo
|
||||
userColor: r.relatedEventCacheBuster, TimelineManager.userColor(userId, Nheko.colors.base)
|
||||
userColor: r.relatedEventCacheBuster, TimelineManager.userColor(userId, palette.base)
|
||||
blurhash: r.relatedEventCacheBuster, fromModel(Room.Blurhash) ?? ""
|
||||
body: r.relatedEventCacheBuster, fromModel(Room.Body) ?? ""
|
||||
formattedBody: r.relatedEventCacheBuster, fromModel(Room.FormattedBody) ?? ""
|
||||
|
@ -186,11 +186,11 @@ AbstractButton {
|
|||
userId: r.relatedEventCacheBuster, fromModel(Room.UserId) ?? ""
|
||||
userName: r.relatedEventCacheBuster, fromModel(Room.UserName) ?? ""
|
||||
thumbnailUrl: r.relatedEventCacheBuster, fromModel(Room.ThumbnailUrl) ?? ""
|
||||
duration: r.relatedEventCacheBuster, fromModel(Room.Duration) ?? ""
|
||||
duration: r.relatedEventCacheBuster, fromModel(Room.Duration) ?? 0
|
||||
roomTopic: r.relatedEventCacheBuster, fromModel(Room.RoomTopic) ?? ""
|
||||
roomName: r.relatedEventCacheBuster, fromModel(Room.RoomName) ?? ""
|
||||
callType: r.relatedEventCacheBuster, fromModel(Room.CallType) ?? ""
|
||||
encryptionError: r.relatedEventCacheBuster, fromModel(Room.EncryptionError) ?? ""
|
||||
encryptionError: r.relatedEventCacheBuster, fromModel(Room.EncryptionError) ?? 0
|
||||
relatedEventCacheBuster: r.relatedEventCacheBuster, fromModel(Room.RelatedEventCacheBuster) ?? 0
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ AbstractButton {
|
|||
width: parent.iconSize
|
||||
sourceSize.width: parent.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.height: parent.iconSize * Screen.devicePixelRatio
|
||||
source: "image://colorimage/:/icons/icons/ui/edit.svg?" + ((eventId == room.edit) ? Nheko.colors.highlight : Nheko.colors.buttonText)
|
||||
source: "image://colorimage/:/icons/icons/ui/edit.svg?" + ((eventId == room.edit) ? palette.highlight : palette.buttonText)
|
||||
ToolTip.visible: editHovered.hovered
|
||||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Edited")
|
||||
|
@ -278,7 +278,7 @@ AbstractButton {
|
|||
height: parent.iconSize
|
||||
width: parent.iconSize
|
||||
image: ":/icons/icons/ui/thread.svg"
|
||||
buttonTextColor: TimelineManager.userColor(threadId, Nheko.colors.base)
|
||||
buttonTextColor: TimelineManager.userColor(threadId, palette.base)
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Part of a thread")
|
||||
|
@ -303,7 +303,7 @@ AbstractButton {
|
|||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||
Layout.preferredWidth: implicitWidth
|
||||
text: timestamp.toLocaleTimeString(Locale.ShortFormat)
|
||||
color: Nheko.inactiveColors.text
|
||||
color: palette.inactive.text
|
||||
ToolTip.visible: ma.hovered
|
||||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: Qt.formatDateTime(timestamp, Qt.DefaultLocaleLongDate)
|
||||
|
@ -341,7 +341,7 @@ AbstractButton {
|
|||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
color: Nheko.colors.highlight
|
||||
color: palette.highlight
|
||||
|
||||
visible: (r.index > 0 && (room.fullyReadEventId == r.eventId))
|
||||
height: visible ? 3 : 0
|
||||
|
|
|
@ -32,12 +32,11 @@ Item {
|
|||
StickerPicker {
|
||||
id: emojiPopup
|
||||
|
||||
colors: Nheko.colors
|
||||
emoji: true
|
||||
}
|
||||
|
||||
// focus message input on key press, but not on Ctrl-C and such.
|
||||
Keys.onPressed: {
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.text && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && !topBar.searchHasFocus) {
|
||||
TimelineManager.focusMessageInput();
|
||||
room.input.setText(room.input.text + event.text);
|
||||
|
@ -54,13 +53,12 @@ Item {
|
|||
anchors.centerIn: parent
|
||||
text: qsTr("No room open")
|
||||
font.pointSize: 24
|
||||
color: Nheko.colors.text
|
||||
}
|
||||
|
||||
Spinner {
|
||||
visible: TimelineManager.isInitialSync
|
||||
anchors.centerIn: parent
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
running: TimelineManager.isInitialSync
|
||||
// height is somewhat arbitrary here... don't set width because width scales w/ height
|
||||
height: parent.height / 16
|
||||
|
@ -102,7 +100,7 @@ Item {
|
|||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
color: Nheko.colors.base
|
||||
color: palette.base
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
@ -223,7 +221,7 @@ Item {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
MatrixText {
|
||||
text: !roomPreview.isFetched ? qsTr("No preview available") : preview.roomName
|
||||
text: !(roomPreview?.isFetched ?? false) ? qsTr("No preview available") : preview.roomName
|
||||
font.pixelSize: 24
|
||||
}
|
||||
|
||||
|
@ -264,13 +262,12 @@ Item {
|
|||
Layout.rightMargin: Nheko.paddingLarge
|
||||
|
||||
TextArea {
|
||||
text: roomPreview.isFetched ? TimelineManager.escapeEmoji(preview.roomTopic) : qsTr("This room is possibly inaccessible. If this room is private, you should remove it from this community.")
|
||||
text: (roomPreview?.isFetched ?? false) ? TimelineManager.escapeEmoji(preview.roomTopic) : qsTr("This room is possibly inaccessible. If this room is private, you should remove it from this community.")
|
||||
wrapMode: TextEdit.WordWrap
|
||||
textFormat: TextEdit.RichText
|
||||
readOnly: true
|
||||
background: null
|
||||
selectByMouse: true
|
||||
color: Nheko.colors.text
|
||||
horizontalAlignment: TextEdit.AlignHCenter
|
||||
onLinkActivated: Nheko.openLink(link)
|
||||
|
||||
|
@ -328,7 +325,6 @@ Item {
|
|||
readOnly: true
|
||||
background: null
|
||||
selectByMouse: true
|
||||
color: Nheko.colors.text
|
||||
horizontalAlignment: TextEdit.AlignHCenter
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ Switch {
|
|||
|
||||
PropertyChanges {
|
||||
target: track
|
||||
border.color: Nheko.colors.highlight
|
||||
border.color: palette.highlight
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
|
@ -88,7 +88,7 @@ Switch {
|
|||
width: parent.height * 0.9
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: Nheko.colors.button
|
||||
color: palette.button
|
||||
border.color: "#767676"
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ Pane {
|
|||
|
||||
padding: 0
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
|
@ -137,7 +137,7 @@ Pane {
|
|||
Layout.column: 2
|
||||
Layout.row: 0
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
text: qsTr("In %1").arg(communityAvatar.displayName)
|
||||
maximumLineCount: 1
|
||||
elide: Text.ElideRight
|
||||
|
@ -178,7 +178,7 @@ Pane {
|
|||
Layout.fillWidth: true
|
||||
Layout.column: 2
|
||||
Layout.row: 1
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
font.pointSize: fontMetrics.font.pointSize * 1.1
|
||||
font.bold: true
|
||||
text: roomName
|
||||
|
@ -241,8 +241,8 @@ Pane {
|
|||
trust: trustlevel
|
||||
enabled: false
|
||||
unencryptedIcon: ":/icons/icons/ui/people.svg"
|
||||
unencryptedColor: Nheko.colors.buttonText
|
||||
unencryptedHoverColor: Nheko.colors.highlight
|
||||
unencryptedColor: palette.buttonText
|
||||
unencryptedHoverColor: palette.highlight
|
||||
hovered: parent.hovered
|
||||
|
||||
ToolTip.delay: Nheko.tooltipDelay
|
||||
|
@ -349,7 +349,6 @@ Pane {
|
|||
visible: !!room && room.pinnedMessages.length > 0 && !Settings.hiddenPins.includes(roomId)
|
||||
clip: true
|
||||
|
||||
palette: Nheko.colors
|
||||
ScrollBar.horizontal.visible: false
|
||||
|
||||
ListView {
|
||||
|
@ -372,7 +371,7 @@ Pane {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: height
|
||||
|
||||
userColor: TimelineManager.userColor(e.userId, Nheko.colors.window)
|
||||
userColor: TimelineManager.userColor(e.userId, palette.window)
|
||||
blurhash: e.blurhash ?? ""
|
||||
body: e.body ?? ""
|
||||
formattedBody: e.formattedBody ?? ""
|
||||
|
@ -387,7 +386,7 @@ Pane {
|
|||
isOnlyEmoji: e.isOnlyEmoji ?? false
|
||||
userId: e.userId ?? ""
|
||||
userName: e.userName ?? ""
|
||||
encryptionError: e.encryptionError ?? ""
|
||||
encryptionError: e.encryptionError ?? 0
|
||||
keepFullText: true
|
||||
}
|
||||
|
||||
|
@ -430,7 +429,6 @@ Pane {
|
|||
visible: !!room && room.widgetLinks.length > 0 && !Settings.hiddenWidgets.includes(roomId)
|
||||
clip: true
|
||||
|
||||
palette: Nheko.colors
|
||||
ScrollBar.horizontal.visible: false
|
||||
|
||||
ListView {
|
||||
|
@ -440,7 +438,7 @@ Pane {
|
|||
delegate: MatrixText {
|
||||
required property var modelData
|
||||
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
text: modelData
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ Item {
|
|||
id: typingRect
|
||||
|
||||
visible: (room && room.typingUsers.length > 0)
|
||||
color: Nheko.colors.base
|
||||
color: palette.base
|
||||
anchors.fill: parent
|
||||
z: 3
|
||||
|
||||
|
@ -27,8 +27,8 @@ Item {
|
|||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10
|
||||
anchors.bottom: parent.bottom
|
||||
color: Nheko.colors.text
|
||||
text: room ? room.formatTypingUsers(room.typingUsers, Nheko.colors.base) : ""
|
||||
color: palette.text
|
||||
text: room ? room.formatTypingUsers(room.typingUsers, palette.base) : ""
|
||||
textFormat: Text.RichText
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Page {
|
|||
width: uploadPopup.availableHeight - buttons.height
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
radius: Nheko.paddingMedium
|
||||
}
|
||||
contentItem: ColumnLayout {
|
||||
|
@ -60,7 +60,7 @@ Page {
|
|||
case MediaUpload.Image: return "image";
|
||||
default: return "zip";
|
||||
}
|
||||
source: (modelData.thumbnail != "") ? modelData.thumbnail : ("image://colorimage/:/icons/icons/ui/"+typeStr+".svg?" + Nheko.colors.buttonText)
|
||||
source: (modelData.thumbnail != "") ? modelData.thumbnail : ("image://colorimage/:/icons/icons/ui/"+typeStr+".svg?" + palette.buttonText)
|
||||
}
|
||||
MatrixTextField {
|
||||
id: namefield
|
||||
|
@ -85,6 +85,6 @@ Page {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.base
|
||||
color: palette.base
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@ import im.nheko 1.0
|
|||
Rectangle {
|
||||
id: tile
|
||||
|
||||
property color background: 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 background: palette.window
|
||||
property color importantText: palette.text
|
||||
property color unimportantText: palette.buttonText
|
||||
property color bubbleBackground: palette.highlight
|
||||
property color bubbleText: palette.highlightedText
|
||||
property int avatarSize: Math.ceil(fontMetrics.lineSpacing * 2.3)
|
||||
required property string avatarUrl
|
||||
required property string title
|
||||
|
@ -37,11 +37,11 @@ Rectangle {
|
|||
|
||||
PropertyChanges {
|
||||
target: tile
|
||||
background: Nheko.colors.dark
|
||||
importantText: Nheko.colors.brightText
|
||||
unimportantText: Nheko.colors.brightText
|
||||
bubbleBackground: Nheko.colors.highlight
|
||||
bubbleText: Nheko.colors.highlightedText
|
||||
background: palette.dark
|
||||
importantText: palette.brightText
|
||||
unimportantText: palette.brightText
|
||||
bubbleBackground: palette.highlight
|
||||
bubbleText: palette.highlightedText
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -51,11 +51,11 @@ Rectangle {
|
|||
|
||||
PropertyChanges {
|
||||
target: tile
|
||||
background: Nheko.colors.highlight
|
||||
importantText: Nheko.colors.highlightedText
|
||||
unimportantText: Nheko.colors.highlightedText
|
||||
bubbleBackground: Nheko.colors.highlightedText
|
||||
bubbleText: Nheko.colors.highlight
|
||||
background: palette.highlight
|
||||
importantText: palette.highlightedText
|
||||
unimportantText: palette.highlightedText
|
||||
bubbleBackground: palette.highlightedText
|
||||
bubbleText: palette.highlight
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ Button {
|
|||
font.capitalization: Font.AllUppercase
|
||||
font.pointSize: Math.ceil(fontMetrics.font.pointSize * 1.5)
|
||||
//font.capitalization: Font.AllUppercase
|
||||
color: Nheko.colors.light
|
||||
color: palette.light
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
|
@ -58,7 +58,7 @@ Button {
|
|||
//height: control.contentItem.implicitHeight * 2
|
||||
//width: control.contentItem.implicitWidth * 2
|
||||
radius: height / 8
|
||||
color: Qt.lighter(Nheko.colors.dark, control.down ? 1.4 : (control.hovered ? 1.2 : 1))
|
||||
color: Qt.lighter(palette.dark, control.down ? 1.4 : (control.hovered ? 1.2 : 1))
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ Dialog {
|
|||
]
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
border.color: Nheko.theme.separator
|
||||
border.width: 1
|
||||
radius: Nheko.paddingSmall
|
||||
|
|
|
@ -13,15 +13,15 @@ TabButton {
|
|||
text: control.text
|
||||
font: control.font
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
color: control.down ? Nheko.colors.highlightedText : Nheko.colors.text
|
||||
color: control.down ? palette.highlightedText : palette.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
border.color: control.down ? Nheko.colors.highlight : Nheko.theme.separator
|
||||
color: control.checked ? Nheko.colors.highlight : Nheko.colors.base
|
||||
border.color: control.down ? palette.highlight : Nheko.theme.separator
|
||||
color: control.checked ? palette.highlight : palette.base
|
||||
border.width: 1
|
||||
radius: 2
|
||||
}
|
||||
|
|
|
@ -47,9 +47,9 @@ Item {
|
|||
width: dragArea.width; height: actualDelegate.implicitHeight + 4
|
||||
|
||||
border.width: dragArea.enabled ? 1 : 0
|
||||
border.color: Nheko.colors.highlight
|
||||
border.color: palette.highlight
|
||||
|
||||
color: dragArea.held ? Nheko.colors.highlight : Nheko.colors.base
|
||||
color: dragArea.held ? palette.highlight : palette.base
|
||||
Behavior on color { ColorAnimation { duration: 100 } }
|
||||
|
||||
radius: 2
|
||||
|
|
|
@ -11,8 +11,8 @@ AbstractButton {
|
|||
id: button
|
||||
|
||||
property alias cursor: mouseArea.cursorShape
|
||||
property color highlightColor: Nheko.colors.highlight
|
||||
property color buttonTextColor: Nheko.colors.buttonText
|
||||
property color highlightColor: palette.highlight
|
||||
property color buttonTextColor: palette.buttonText
|
||||
|
||||
focusPolicy: Qt.NoFocus
|
||||
width: buttonText.implicitWidth
|
||||
|
|
|
@ -36,7 +36,7 @@ ItemDelegate {
|
|||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: displayName
|
||||
color: TimelineManager.userColor(userid, Nheko.colors.window)
|
||||
color: TimelineManager.userColor(userid, palette.window)
|
||||
font.pointSize: fontMetrics.font.pointSize
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ ItemDelegate {
|
|||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
text: userid
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
font.pointSize: fontMetrics.font.pointSize * 0.9
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ Rectangle {
|
|||
width: parent.width? parent.width : 0
|
||||
implicitWidth: encryptedText.implicitWidth+24+Nheko.paddingMedium*3 // Column doesn't provide a useful implicitWidth, should be replaced by ColumnLayout
|
||||
height: contents.implicitHeight + Nheko.paddingMedium * 2
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
|
||||
RowLayout {
|
||||
id: contents
|
||||
|
@ -58,12 +58,11 @@ Rectangle {
|
|||
return qsTr("Unknown decryption error");
|
||||
}
|
||||
}
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
Button {
|
||||
palette: Nheko.colors
|
||||
visible: encryptionError == Olm.MissingSession || encryptionError == Olm.MissingSessionIndex
|
||||
text: qsTr("Request key")
|
||||
onClicked: room.requestKeyForEvent(eventId)
|
||||
|
|
|
@ -17,7 +17,7 @@ Rectangle {
|
|||
width: parent.width ? Math.min(parent.width, 700) : 0
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: contents.implicitHeight + Nheko.paddingMedium * 2
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
border.color: Nheko.theme.green
|
||||
border.width: 2
|
||||
|
||||
|
@ -43,13 +43,13 @@ Rectangle {
|
|||
text: qsTr("%1 enabled end-to-end encryption").arg(r.username)
|
||||
font.bold: true
|
||||
font.pointSize: 14
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
MatrixText {
|
||||
text: qsTr("Encryption keeps your messages safe by only allowing the people you sent the message to to read it. For extra security, if you want to make sure you are talking to the right people, you can verify them in real life.")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Item {
|
|||
Rectangle {
|
||||
id: button
|
||||
|
||||
color: Nheko.colors.light
|
||||
color: palette.light
|
||||
radius: 22
|
||||
height: 44
|
||||
width: 44
|
||||
|
@ -67,7 +67,7 @@ Item {
|
|||
text: filename
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Text {
|
||||
|
@ -77,7 +77,7 @@ Item {
|
|||
text: filesize
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ Item {
|
|||
}
|
||||
|
||||
Rectangle {
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
z: -1
|
||||
radius: 10
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -22,7 +22,7 @@ AbstractButton {
|
|||
property int tempWidth: originalWidth < 1? 400: originalWidth
|
||||
|
||||
implicitWidth: Math.round(tempWidth*Math.min((timelineView.height/divisor)/(tempWidth*proportionalHeight), 1))
|
||||
width: Math.min(parent.width,implicitWidth)
|
||||
width: Math.min(parent?.width ?? 2000,implicitWidth)
|
||||
height: width*proportionalHeight
|
||||
hoverEnabled: true
|
||||
|
||||
|
@ -106,14 +106,14 @@ AbstractButton {
|
|||
]
|
||||
|
||||
property int metadataWidth
|
||||
property bool fitsMetadata: (parent.width - width) > metadataWidth+4
|
||||
property bool fitsMetadata: parent != null ? (parent.width - width) > metadataWidth+4 : false
|
||||
|
||||
Image {
|
||||
id: img
|
||||
|
||||
visible: !mxcimage.loaded
|
||||
anchors.fill: parent
|
||||
source: url.replace("mxc://", "image://MxcImage/") + "?scale"
|
||||
source: url != "" ? (url.replace("mxc://", "image://MxcImage/") + "?scale") : ""
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
|
@ -137,7 +137,7 @@ AbstractButton {
|
|||
id: blurhash_
|
||||
|
||||
anchors.fill: parent
|
||||
source: blurhash ? ("image://blurhash/" + blurhash) : ("image://colorimage/:/icons/icons/ui/image-failed.svg?" + Nheko.colors.buttonText)
|
||||
source: blurhash ? ("image://blurhash/" + blurhash) : ("image://colorimage/:/icons/icons/ui/image-failed.svg?" + palette.buttonText)
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
sourceSize.width: parent.width * Screen.devicePixelRatio
|
||||
|
@ -158,7 +158,7 @@ AbstractButton {
|
|||
width: parent.width
|
||||
implicitHeight: imgcaption.implicitHeight
|
||||
anchors.bottom: overlay.bottom
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
opacity: 0.75
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ AbstractButton {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
// See this MSC: https://github.com/matrix-org/matrix-doc/pull/2530
|
||||
text: filename ? filename : body
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ Item {
|
|||
required property bool isReply
|
||||
property bool keepFullText: !isReply
|
||||
property alias child: chooser.child
|
||||
implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : 0
|
||||
//implicitWidth: chooser.child?.implicitWidth ?? 0
|
||||
required property double proportionalHeight
|
||||
required property int type
|
||||
required property string typeString
|
||||
|
@ -48,7 +48,7 @@ Item {
|
|||
roleValue: type
|
||||
//anchors.fill: parent
|
||||
|
||||
width: parent.width? parent.width: 0 // this should get rid of "cannot read property 'width' of null"
|
||||
width: parent?.width ?? 0 // this should get rid of "cannot read property 'width' of null"
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: MtxEvent.UnknownEvent
|
||||
|
@ -78,7 +78,6 @@ Item {
|
|||
}
|
||||
|
||||
Button {
|
||||
palette: Nheko.colors
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Go to replacement room")
|
||||
onClicked: room.joinReplacementRoom(eventId)
|
||||
|
@ -149,7 +148,7 @@ Item {
|
|||
|
||||
NoticeMessage {
|
||||
formatted: TimelineManager.escapeEmoji(d.userName) + " " + d.formattedBody
|
||||
color: TimelineManager.userColor(d.userId, Nheko.colors.base)
|
||||
color: TimelineManager.userColor(d.userId, palette.base)
|
||||
body: d.body
|
||||
isOnlyEmoji: d.isOnlyEmoji
|
||||
isReply: d.isReply
|
||||
|
@ -617,7 +616,6 @@ Item {
|
|||
|
||||
Button {
|
||||
visible: d.relatedEventCacheBuster, room.showAcceptKnockButton(d.eventId)
|
||||
palette: Nheko.colors
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Allow them in")
|
||||
onClicked: room.acceptKnock(eventId)
|
||||
|
|
|
@ -9,7 +9,7 @@ import im.nheko 1.0
|
|||
TextMessage {
|
||||
property bool isStateEvent
|
||||
font.italic: true
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
font.pointSize: isStateEvent? 0.8*Settings.fontSize : Settings.fontSize
|
||||
horizontalAlignment: isStateEvent? Text.AlignHCenter : undefined
|
||||
}
|
||||
|
|
|
@ -8,14 +8,14 @@ import im.nheko 1.0
|
|||
|
||||
Label {
|
||||
property bool isStateEvent
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
height: Math.round(fontMetrics.height * 1.4)
|
||||
width: contentWidth * 1.2
|
||||
|
||||
background: Rectangle {
|
||||
radius: parent.height / 2
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,5 +10,5 @@ MatrixText {
|
|||
|
||||
text: qsTr("unimplemented event: ") + typeString
|
||||
// width: parent.width
|
||||
color: Nheko.inactiveColors.text
|
||||
color: palette.inactive.text
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ Item {
|
|||
Rectangle {
|
||||
id: videoContainer
|
||||
|
||||
color: type == MtxEvent.VideoMessage ? Nheko.colors.window : "transparent"
|
||||
color: type == MtxEvent.VideoMessage ? palette.window : "transparent"
|
||||
width: parent.width
|
||||
height: parent.height - fileInfoLabel.height
|
||||
|
||||
|
@ -57,7 +57,7 @@ Item {
|
|||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: thumbnailUrl ? thumbnailUrl.replace("mxc://", "image://MxcImage/") + "?scale" : "image://colorimage/:/icons/icons/ui/video-file.svg?" + Nheko.colors.windowText
|
||||
source: thumbnailUrl ? thumbnailUrl.replace("mxc://", "image://MxcImage/") + "?scale" : "image://colorimage/:/icons/icons/ui/video-file.svg?" + palette.windowText
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
|
@ -99,10 +99,10 @@ Item {
|
|||
text: body + " [" + filesize + "]"
|
||||
textFormat: Text.RichText
|
||||
elide: Text.ElideRight
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.base
|
||||
color: palette.base
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ Rectangle{
|
|||
implicitWidth: redactedLayout.implicitWidth + 2 * Nheko.paddingMedium
|
||||
width: Math.min(parent.width,implicitWidth+1)
|
||||
radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
property int metadataWidth
|
||||
property bool fitsMetadata: parent.width - redactedLayout.width > metadataWidth + 4
|
||||
|
||||
|
@ -28,7 +28,7 @@ Rectangle{
|
|||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.preferredWidth: fontMetrics.font.pixelSize
|
||||
Layout.preferredHeight: fontMetrics.font.pixelSize
|
||||
source: "image://colorimage/:/icons/icons/ui/delete.svg?" + Nheko.colors.text
|
||||
source: "image://colorimage/:/icons/icons/ui/delete.svg?" + palette.text
|
||||
}
|
||||
Label {
|
||||
id: redactedLabel
|
||||
|
@ -39,7 +39,7 @@ Rectangle{
|
|||
property var redactedPair: room.formatRedactedEvent(eventId)
|
||||
text: redactedPair["first"]
|
||||
wrapMode: Label.WordWrap
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
ToolTip.text: redactedPair["second"]
|
||||
ToolTip.visible: hh.hovered
|
||||
|
|
|
@ -54,7 +54,7 @@ AbstractButton {
|
|||
anchors.top: replyContainer.top
|
||||
anchors.bottom: replyContainer.bottom
|
||||
width: 4
|
||||
color: TimelineManager.userColor(userId, Nheko.colors.base)
|
||||
color: TimelineManager.userColor(userId, palette.base)
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
|
@ -135,8 +135,8 @@ AbstractButton {
|
|||
|
||||
z: -1
|
||||
anchors.fill: replyContainer
|
||||
property color userColor: TimelineManager.userColor(userId, Nheko.colors.base)
|
||||
property color bgColor: Nheko.colors.base
|
||||
property color userColor: TimelineManager.userColor(userId, palette.base)
|
||||
property color bgColor: palette.base
|
||||
color: Qt.tint(bgColor, Qt.hsla(userColor.hslHue, 0.5, userColor.hslLightness, 0.1))
|
||||
}
|
||||
|
||||
|
|
|
@ -19,15 +19,15 @@ MatrixText {
|
|||
// table border-collapse doesn't seem to work
|
||||
text: "
|
||||
<style type=\"text/css\">
|
||||
a { color:" + Nheko.colors.link + ";}
|
||||
code { background-color: " + Nheko.colors.alternateBase + "; white-space: pre-wrap; }
|
||||
pre { background-color: " + Nheko.colors.alternateBase + "; white-space: pre-wrap; }
|
||||
a { color:" + palette.link + ";}
|
||||
code { background-color: " + palette.alternateBase + "; white-space: pre-wrap; }
|
||||
pre { background-color: " + palette.alternateBase + "; white-space: pre-wrap; }
|
||||
table {
|
||||
border-width: 1px;
|
||||
border-collapse: collapse;
|
||||
border-style: solid;
|
||||
border-color: " + Nheko.colors.text + ";
|
||||
background-color: " + Nheko.colors.alternateBase + ";
|
||||
border-color: " + palette.text + ";
|
||||
background-color: " + palette.alternateBase + ";
|
||||
}
|
||||
table th,
|
||||
table td {
|
||||
|
@ -36,11 +36,11 @@ MatrixText {
|
|||
blockquote { margin-left: 1em; }
|
||||
" + (!Settings.mobileMode ? "span[data-mx-spoiler] {
|
||||
color: transparent;
|
||||
background-color: " + Nheko.colors.text + ";
|
||||
background-color: " + palette.text + ";
|
||||
}" : "") + // TODO(Nico): Figure out how to support mobile
|
||||
"</style>
|
||||
" + formatted.replace(/<del>/g, "<s>").replace(/<\/del>/g, "</s>").replace(/<strike>/g, "<s>").replace(/<\/strike>/g, "</s>")
|
||||
width: parent.width
|
||||
width: parent?.width ?? 0
|
||||
height: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight
|
||||
clip: !keepFullText
|
||||
selectByMouse: !Settings.mobileMode && !isReply
|
||||
|
|
|
@ -15,8 +15,7 @@ ApplicationWindow {
|
|||
onClosing: VerificationManager.removeVerificationFlow(flow)
|
||||
title: stack.currentItem ? (stack.currentItem.title_ || "") : ""
|
||||
modality: Qt.NonModal
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
//height: stack.currentItem.implicitHeight
|
||||
minimumHeight: stack.currentItem.implicitHeight + 2 * Nheko.paddingLarge
|
||||
height: stack.currentItem.implicitHeight + 2 * Nheko.paddingMedium
|
||||
|
@ -25,7 +24,7 @@ ApplicationWindow {
|
|||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ ColumnLayout {
|
|||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
text: qsTr("Please verify the following digits. You should see the same numbers on both sides. If they differ, please press 'They do not match!' to abort verification!")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
@ -28,19 +28,19 @@ ColumnLayout {
|
|||
Label {
|
||||
font.pixelSize: Qt.application.font.pixelSize * 2
|
||||
text: flow.sasList[0]
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Label {
|
||||
font.pixelSize: Qt.application.font.pixelSize * 2
|
||||
text: flow.sasList[1]
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Label {
|
||||
font.pixelSize: Qt.application.font.pixelSize * 2
|
||||
text: flow.sasList[2]
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ ColumnLayout {
|
|||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
text: qsTr("Please verify the following emoji. You should see the same emoji on both sides. If they differ, please press 'They do not match!' to abort verification!")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
@ -373,13 +373,13 @@ ColumnLayout {
|
|||
text: col.emoji.emoji
|
||||
font.pixelSize: Qt.application.font.pixelSize * 2
|
||||
font.family: Settings.emojiFont
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
text: col.emoji.description
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ ColumnLayout {
|
|||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
text: qsTr("The displayed emoji might look different in different clients if a different font is used. Similarly they might be translated into different languages. Nonetheless they should depict one of 64 different objects or animals. For example a lion and a cat are different, but a cat is the same even if one client just shows a cat face, while another client shows a full cat body.")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ ColumnLayout {
|
|||
return qsTr("Unknown verification error.");
|
||||
}
|
||||
}
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ ColumnLayout {
|
|||
return qsTr("Your device (%1) has requested to be verified.").arg(flow.deviceId);
|
||||
}
|
||||
}
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ ColumnLayout {
|
|||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
text: qsTr("Verification successful! Both sides verified their devices!")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
|
|
@ -30,14 +30,14 @@ ColumnLayout {
|
|||
return "";
|
||||
}
|
||||
}
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true; }
|
||||
Spinner {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
Item { Layout.fillHeight: true; }
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ ApplicationWindow {
|
|||
font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 1.1)
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: false
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.bottomMargin: Nheko.paddingMedium
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ ApplicationWindow {
|
|||
Text {
|
||||
Layout.fillWidth: true
|
||||
text: model.name
|
||||
color: model.isPublished ? Nheko.colors.text : Nheko.theme.error
|
||||
color: model.isPublished ? palette.text : Nheko.theme.error
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
|
||||
|
@ -78,8 +78,8 @@ ApplicationWindow {
|
|||
Layout.margins: 2
|
||||
image: ":/icons/icons/ui/star.svg"
|
||||
hoverEnabled: true
|
||||
buttonTextColor: model.isCanonical ? Nheko.colors.highlight : Nheko.colors.text
|
||||
highlightColor: editingModel.canAdvertize ? Nheko.colors.highlight : buttonTextColor
|
||||
buttonTextColor: model.isCanonical ? palette.highlight : palette.text
|
||||
highlightColor: editingModel.canAdvertize ? palette.highlight : buttonTextColor
|
||||
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: model.isCanonical ? qsTr("Primary alias") : qsTr("Make primary alias")
|
||||
|
@ -92,8 +92,8 @@ ApplicationWindow {
|
|||
Layout.margins: 2
|
||||
image: ":/icons/icons/ui/building-shop.svg"
|
||||
hoverEnabled: true
|
||||
buttonTextColor: model.isAdvertized ? Nheko.colors.highlight : Nheko.colors.text
|
||||
highlightColor: editingModel.canAdvertize ? Nheko.colors.highlight : buttonTextColor
|
||||
buttonTextColor: model.isAdvertized ? palette.highlight : palette.text
|
||||
highlightColor: editingModel.canAdvertize ? palette.highlight : buttonTextColor
|
||||
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: qsTr("Advertise as an alias in this room")
|
||||
|
@ -106,7 +106,7 @@ ApplicationWindow {
|
|||
Layout.margins: 2
|
||||
image: ":/icons/icons/ui/room-directory.svg"
|
||||
hoverEnabled: true
|
||||
buttonTextColor: model.isPublished ? Nheko.colors.highlight : Nheko.colors.text
|
||||
buttonTextColor: model.isPublished ? palette.highlight : palette.text
|
||||
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: qsTr("Publish in room directory")
|
||||
|
@ -139,7 +139,7 @@ ApplicationWindow {
|
|||
Layout.fillWidth: true
|
||||
selectByMouse: true
|
||||
font.pixelSize: fontMetrics.font.pixelSize
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
placeholderText: qsTr("#new-alias:server.tld")
|
||||
|
||||
Component.onCompleted: forceActiveFocus()
|
||||
|
|
|
@ -20,8 +20,7 @@ ApplicationWindow {
|
|||
minimumHeight: 450
|
||||
width: 450
|
||||
height: 680
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
modality: Qt.NonModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
title: qsTr("Allowed rooms settings")
|
||||
|
@ -42,7 +41,7 @@ ApplicationWindow {
|
|||
font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 1.1)
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: false
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.bottomMargin: Nheko.paddingMedium
|
||||
}
|
||||
|
||||
|
@ -72,14 +71,14 @@ ApplicationWindow {
|
|||
Text {
|
||||
Layout.fillWidth: true
|
||||
text: model.name
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
text: model.isParent ? qsTr("Parent community") : qsTr("Other room")
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +121,7 @@ ApplicationWindow {
|
|||
|
||||
placeholderText: qsTr("Enter additional rooms not in the list yet...")
|
||||
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
onTextEdited: {
|
||||
roomCompleter.completer.searchString = text;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@ ApplicationWindow {
|
|||
title: summary.isSpace ? qsTr("Confirm community join") : qsTr("Confirm room join")
|
||||
modality: Qt.WindowModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
width: 350
|
||||
height: content.implicitHeight + Nheko.paddingLarge + footer.implicitHeight
|
||||
|
||||
|
@ -48,7 +47,7 @@ ApplicationWindow {
|
|||
Spinner {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
visible: !summary.isLoaded
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
running: !summary.isLoaded
|
||||
}
|
||||
|
||||
|
@ -57,7 +56,7 @@ ApplicationWindow {
|
|||
textFormat: TextEdit.RichText
|
||||
text: summary.roomName
|
||||
font.pixelSize: fontMetrics.font.pixelSize * 2
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
|
@ -70,7 +69,7 @@ ApplicationWindow {
|
|||
textFormat: TextEdit.RichText
|
||||
text: summary.roomid
|
||||
font.pixelSize: fontMetrics.font.pixelSize * 0.8
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
|
@ -96,7 +95,7 @@ ApplicationWindow {
|
|||
readOnly: true
|
||||
textFormat: TextEdit.RichText
|
||||
text: summary.roomTopic
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
|
@ -109,7 +108,7 @@ ApplicationWindow {
|
|||
id: promptLabel
|
||||
|
||||
text: summary.isKnockOnly ? qsTr("This room can't be joined directly. You can, however, knock on the room and room members can accept or decline this join request. You can additionally provide a reason for them to let you in below:") : qsTr("Do you want to join this room? You can optionally add a reason below:")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.Wrap
|
||||
|
|
|
@ -55,14 +55,14 @@ ApplicationWindow {
|
|||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: profile? profile.displayName : ""
|
||||
color: TimelineManager.userColor(userID.text, Nheko.colors.window)
|
||||
color: TimelineManager.userColor(userID.text, palette.window)
|
||||
font.pointSize: fontMetrics.font.pointSize
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: userID.text
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
font.pointSize: fontMetrics.font.pointSize * 0.9
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ ApplicationWindow {
|
|||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Encryption")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
ToggleButton {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
|
|
@ -64,7 +64,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
Layout.preferredWidth: implicitWidth
|
||||
text: "#"
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
MatrixTextField {
|
||||
id: newRoomAlias
|
||||
|
@ -75,14 +75,14 @@ ApplicationWindow {
|
|||
Layout.preferredWidth: implicitWidth
|
||||
property string userName: userInfoGrid.profile.userid
|
||||
text: userName.substring(userName.indexOf(":"))
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
}
|
||||
Label {
|
||||
Layout.preferredWidth: implicitWidth
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Public")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
HoverHandler {
|
||||
id: privateHover
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ ApplicationWindow {
|
|||
Layout.preferredWidth: implicitWidth
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Trusted")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
HoverHandler {
|
||||
id: trustedHover
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ ApplicationWindow {
|
|||
Layout.preferredWidth: implicitWidth
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Encryption")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
HoverHandler {
|
||||
id: encryptionHover
|
||||
}
|
||||
|
|
|
@ -22,8 +22,7 @@ ApplicationWindow {
|
|||
title: qsTr("Editing image pack")
|
||||
height: 600
|
||||
width: 600
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.base
|
||||
color: palette.base
|
||||
modality: Qt.WindowModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
|
@ -73,13 +72,12 @@ ApplicationWindow {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: parent.height - Nheko.paddingSmall * 2
|
||||
width: 3
|
||||
color: Nheko.colors.highlight
|
||||
color: palette.highlight
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
footer: Button {
|
||||
palette: Nheko.colors
|
||||
onClicked: addFilesDialog.open()
|
||||
width: ListView.view.width
|
||||
text: qsTr("Add images")
|
||||
|
@ -100,11 +98,11 @@ ApplicationWindow {
|
|||
delegate: AvatarListTile {
|
||||
id: packItem
|
||||
|
||||
property color background: 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 background: palette.window
|
||||
property color importantText: palette.text
|
||||
property color unimportantText: palette.buttonText
|
||||
property color bubbleBackground: palette.highlight
|
||||
property color bubbleText: palette.highlightedText
|
||||
required property string shortCode
|
||||
required property string url
|
||||
required property string body
|
||||
|
@ -129,7 +127,7 @@ ApplicationWindow {
|
|||
id: packinfoC
|
||||
|
||||
Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
|
||||
GridLayout {
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -23,8 +23,7 @@ ApplicationWindow {
|
|||
title: qsTr("Image pack settings")
|
||||
height: 600
|
||||
width: 800
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.base
|
||||
color: palette.base
|
||||
modality: Qt.NonModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
|
@ -64,7 +63,6 @@ ApplicationWindow {
|
|||
|
||||
footer: ColumnLayout {
|
||||
Button {
|
||||
palette: Nheko.colors
|
||||
onClicked: {
|
||||
var dialog = packEditor.createObject(timelineRoot, {
|
||||
"imagePack": packlist.newPack(false)
|
||||
|
@ -78,7 +76,6 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
Button {
|
||||
palette: Nheko.colors
|
||||
onClicked: {
|
||||
var dialog = packEditor.createObject(timelineRoot, {
|
||||
"imagePack": packlist.newPack(true)
|
||||
|
@ -96,11 +93,11 @@ ApplicationWindow {
|
|||
delegate: AvatarListTile {
|
||||
id: packItem
|
||||
|
||||
property color background: 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 background: palette.window
|
||||
property color importantText: palette.text
|
||||
property color unimportantText: palette.buttonText
|
||||
property color bubbleBackground: palette.highlight
|
||||
property color bubbleText: palette.highlightedText
|
||||
required property string displayName
|
||||
required property bool fromAccountData
|
||||
required property bool fromCurrentRoom
|
||||
|
@ -135,7 +132,7 @@ ApplicationWindow {
|
|||
id: packinfoC
|
||||
|
||||
Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
|
||||
ColumnLayout {
|
||||
id: packinfo
|
||||
|
@ -243,7 +240,7 @@ ApplicationWindow {
|
|||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: hovered ? Nheko.colors.highlight : 'transparent'
|
||||
color: hovered ? palette.highlight : 'transparent'
|
||||
radius: 5
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
id: promptLabel
|
||||
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
MatrixTextField {
|
||||
|
|
|
@ -40,8 +40,7 @@ ApplicationWindow {
|
|||
title: qsTr("Invite users to %1").arg(invitees.room.plainRoomName)
|
||||
height: 380
|
||||
width: 340
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
Shortcut {
|
||||
|
@ -74,12 +73,12 @@ ApplicationWindow {
|
|||
anchors.centerIn: parent
|
||||
id: inviteeUserid
|
||||
text: model.displayName != "" ? model.displayName : model.userid
|
||||
color: inviteeButton.hovered ? Nheko.colors.highlightedText: Nheko.colors.text
|
||||
color: inviteeButton.hovered ? palette.highlightedText: palette.text
|
||||
maximumLineCount: 1
|
||||
}
|
||||
background: Rectangle {
|
||||
border.color: Nheko.colors.text
|
||||
color: inviteeButton.hovered ? Nheko.colors.highlight : Nheko.colors.window
|
||||
border.color: palette.text
|
||||
color: inviteeButton.hovered ? palette.highlight : palette.window
|
||||
border.width: 1
|
||||
radius: inviteeButton.height / 2
|
||||
}
|
||||
|
@ -90,7 +89,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Search user")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
RowLayout {
|
||||
spacing: Nheko.paddingMedium
|
||||
|
@ -100,7 +99,7 @@ ApplicationWindow {
|
|||
|
||||
property bool isValidMxid: text.match("@.+?:.{3,}")
|
||||
|
||||
backgroundColor: Nheko.colors.window
|
||||
backgroundColor: palette.window
|
||||
placeholderText: qsTr("@joe:matrix.org", "Example user id. The name 'joe' can be localized however you want.")
|
||||
Layout.fillWidth: true
|
||||
onAccepted: {
|
||||
|
@ -158,7 +157,7 @@ ApplicationWindow {
|
|||
avatarUrl: profile? profile.avatarUrl : ""
|
||||
userid: inviteeEntry.text
|
||||
onClicked: addInvite(inviteeEntry.text, displayName, avatarUrl)
|
||||
bgColor: del3.hovered ? Nheko.colors.dark : inviteDialogRoot.color
|
||||
bgColor: del3.hovered ? palette.dark : inviteDialogRoot.color
|
||||
}
|
||||
ListView {
|
||||
visible: !inviteeEntry.isValidMxid
|
||||
|
@ -175,7 +174,7 @@ ApplicationWindow {
|
|||
userid: model.userid
|
||||
avatarUrl: model.avatarUrl
|
||||
onClicked: addInvite(userid, displayName, avatarUrl)
|
||||
bgColor: del2.hovered ? Nheko.colors.dark : inviteDialogRoot.color
|
||||
bgColor: del2.hovered ? palette.dark : inviteDialogRoot.color
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
|
@ -202,7 +201,7 @@ ApplicationWindow {
|
|||
userid: model.mxid
|
||||
avatarUrl: model.avatarUrl
|
||||
displayName: model.displayName
|
||||
bgColor: del.hovered ? Nheko.colors.dark : inviteDialogRoot.color
|
||||
bgColor: del.hovered ? palette.dark : inviteDialogRoot.color
|
||||
ImageButton {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Nheko.paddingSmall
|
||||
|
|
|
@ -14,8 +14,7 @@ ApplicationWindow {
|
|||
title: qsTr("Join room")
|
||||
modality: Qt.WindowModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
width: 350
|
||||
height: fontMetrics.lineSpacing * 7
|
||||
|
||||
|
@ -33,7 +32,7 @@ ApplicationWindow {
|
|||
id: promptLabel
|
||||
|
||||
text: qsTr("Room ID or alias")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
MatrixTextField {
|
||||
|
|
|
@ -31,7 +31,7 @@ ApplicationWindow {
|
|||
id: promptLabel
|
||||
|
||||
Layout.columnSpan: 2
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
|
|
@ -41,14 +41,13 @@ ApplicationWindow {
|
|||
font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 1.1)
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: false
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.bottomMargin: Nheko.paddingMedium
|
||||
}
|
||||
|
||||
TabBar {
|
||||
id: bar
|
||||
width: parent.width
|
||||
palette: Nheko.colors
|
||||
|
||||
NhekoTabButton {
|
||||
text: qsTr("Roles")
|
||||
|
@ -60,7 +59,7 @@ ApplicationWindow {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
border.width: 1
|
||||
border.color: Nheko.theme.separator
|
||||
|
||||
|
@ -78,7 +77,7 @@ ApplicationWindow {
|
|||
font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 1.1)
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: false
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ReorderableListview {
|
||||
|
@ -91,7 +90,7 @@ ApplicationWindow {
|
|||
Column {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Text { visible: model.isType; text: model.displayName; color: Nheko.colors.text}
|
||||
Text { visible: model.isType; text: model.displayName; color: palette.text}
|
||||
Text {
|
||||
visible: !model.isType;
|
||||
text: {
|
||||
|
@ -104,7 +103,7 @@ ApplicationWindow {
|
|||
else
|
||||
return qsTr("Custom (%1)").arg(model.powerlevel)
|
||||
}
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +136,7 @@ ApplicationWindow {
|
|||
z: 5
|
||||
visible: false
|
||||
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
Keys.onPressed: {
|
||||
if (typeEntry.text.includes('.') && event.matches(StandardKey.InsertParagraphSeparator)) {
|
||||
|
@ -166,7 +165,7 @@ ApplicationWindow {
|
|||
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
|
||||
RowLayout {
|
||||
spacing: Nheko.paddingMedium
|
||||
|
@ -238,7 +237,7 @@ ApplicationWindow {
|
|||
|
||||
width: parent.width
|
||||
//font.pixelSize: Math.ceil(quickSwitcher.textHeight * 0.6)
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
onTextEdited: {
|
||||
userCompleter.completer.searchString = text;
|
||||
}
|
||||
|
@ -318,11 +317,11 @@ ApplicationWindow {
|
|||
if (model.isUser)
|
||||
return model.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
else if (editingModel.adminLevel >= model.powerlevel)
|
||||
return "image://colorimage/:/icons/icons/ui/ribbon_star.svg?" + Nheko.colors.buttonText;
|
||||
return "image://colorimage/:/icons/icons/ui/ribbon_star.svg?" + palette.buttonText;
|
||||
else if (editingModel.moderatorLevel >= model.powerlevel)
|
||||
return "image://colorimage/:/icons/icons/ui/ribbon.svg?" + Nheko.colors.buttonText;
|
||||
return "image://colorimage/:/icons/icons/ui/ribbon.svg?" + palette.buttonText;
|
||||
else
|
||||
return "image://colorimage/:/icons/icons/ui/person.svg?" + Nheko.colors.buttonText;
|
||||
return "image://colorimage/:/icons/icons/ui/person.svg?" + palette.buttonText;
|
||||
}
|
||||
displayName: model.displayName
|
||||
enabled: false
|
||||
|
@ -330,8 +329,8 @@ ApplicationWindow {
|
|||
Column {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Text { visible: model.isUser; text: model.displayName; color: Nheko.colors.text}
|
||||
Text { visible: model.isUser; text: model.mxid; color: Nheko.colors.text}
|
||||
Text { visible: model.isUser; text: model.displayName; color: palette.text}
|
||||
Text { visible: model.isUser; text: model.mxid; color: palette.text}
|
||||
Text {
|
||||
visible: !model.isUser;
|
||||
text: {
|
||||
|
@ -342,7 +341,7 @@ ApplicationWindow {
|
|||
else
|
||||
return qsTr("Custom (%1)").arg(model.powerlevel)
|
||||
}
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@ ApplicationWindow {
|
|||
minimumHeight: 450
|
||||
width: 450
|
||||
height: 680
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
modality: Qt.NonModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
title: qsTr("Apply permission changes")
|
||||
|
@ -43,7 +42,7 @@ ApplicationWindow {
|
|||
font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 1.1)
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: false
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.bottomMargin: Nheko.paddingMedium
|
||||
}
|
||||
|
||||
|
@ -55,7 +54,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Apply permissions recursively")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
|
@ -67,7 +66,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Overwrite exisiting modifications in rooms")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
|
@ -103,7 +102,7 @@ ApplicationWindow {
|
|||
Text {
|
||||
Layout.fillWidth: true
|
||||
text: model.displayName
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
@ -117,7 +116,7 @@ ApplicationWindow {
|
|||
return qsTr("Permissions synchronized with community")
|
||||
}
|
||||
elide: Text.ElideRight
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,7 @@ ApplicationWindow {
|
|||
|
||||
height: 420
|
||||
width: 420
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
flags: Qt.Tool | Qt.WindowStaysOnTopHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
Shortcut {
|
||||
|
@ -25,14 +24,13 @@ ApplicationWindow {
|
|||
ScrollView {
|
||||
anchors.margins: Nheko.paddingMedium
|
||||
anchors.fill: parent
|
||||
palette: Nheko.colors
|
||||
padding: Nheko.paddingMedium
|
||||
|
||||
TextArea {
|
||||
id: rawMessageView
|
||||
|
||||
font: Nheko.monospaceFont()
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
readOnly: true
|
||||
selectByMouse: !Settings.mobileMode
|
||||
textFormat: Text.PlainText
|
||||
|
@ -40,7 +38,7 @@ ApplicationWindow {
|
|||
anchors.fill: parent
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.base
|
||||
color: palette.base
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,8 +18,7 @@ ApplicationWindow {
|
|||
width: 340
|
||||
minimumHeight: 380
|
||||
minimumWidth: headerTitle.width + 2 * Nheko.paddingMedium
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
Shortcut {
|
||||
|
@ -35,14 +34,13 @@ ApplicationWindow {
|
|||
Label {
|
||||
id: headerTitle
|
||||
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: qsTr("Read receipts")
|
||||
font.pointSize: fontMetrics.font.pointSize * 1.5
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
palette: Nheko.colors
|
||||
padding: Nheko.paddingMedium
|
||||
ScrollBar.horizontal.visible: false
|
||||
Layout.fillHeight: true
|
||||
|
@ -67,7 +65,7 @@ ApplicationWindow {
|
|||
ToolTip.visible: hovered
|
||||
ToolTip.text: model.mxid
|
||||
background: Rectangle {
|
||||
color: del.hovered ? Nheko.colors.dark : readReceiptsRoot.color
|
||||
color: del.hovered ? palette.dark : readReceiptsRoot.color
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
@ -94,7 +92,7 @@ ApplicationWindow {
|
|||
|
||||
ElidedLabel {
|
||||
text: model.displayName
|
||||
color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window)
|
||||
color: TimelineManager.userColor(model ? model.mxid : "", palette.window)
|
||||
font.pointSize: fontMetrics.font.pointSize
|
||||
elideWidth: del.width - Nheko.paddingMedium - avatar.width
|
||||
Layout.fillWidth: true
|
||||
|
@ -102,7 +100,7 @@ ApplicationWindow {
|
|||
|
||||
ElidedLabel {
|
||||
text: model.timestamp
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
font.pointSize: fontMetrics.font.pointSize * 0.9
|
||||
elideWidth: del.width - Nheko.paddingMedium - avatar.width
|
||||
Layout.fillWidth: true
|
||||
|
|
|
@ -18,8 +18,7 @@ ApplicationWindow {
|
|||
minimumHeight: 340
|
||||
height: 420
|
||||
width: 650
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
modality: Qt.NonModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
title: qsTr("Explore Public Rooms")
|
||||
|
@ -43,9 +42,9 @@ ApplicationWindow {
|
|||
delegate: Rectangle {
|
||||
id: roomDirDelegate
|
||||
|
||||
property color background: Nheko.colors.window
|
||||
property color importantText: Nheko.colors.text
|
||||
property color unimportantText: Nheko.colors.buttonText
|
||||
property color background: palette.window
|
||||
property color importantText: palette.text
|
||||
property color unimportantText: palette.buttonText
|
||||
property int avatarSize: fontMetrics.height * 3.2
|
||||
|
||||
color: background
|
||||
|
@ -143,7 +142,7 @@ ApplicationWindow {
|
|||
anchors.centerIn: parent
|
||||
anchors.margins: Nheko.paddingLarge
|
||||
running: visible
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -164,7 +163,7 @@ ApplicationWindow {
|
|||
Layout.fillWidth: true
|
||||
selectByMouse: true
|
||||
font.pixelSize: fontMetrics.font.pixelSize
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
placeholderText: qsTr("Search for public rooms")
|
||||
onTextChanged: searchTimer.restart()
|
||||
|
||||
|
@ -176,7 +175,7 @@ ApplicationWindow {
|
|||
|
||||
Layout.minimumWidth: 0.3 * header.width
|
||||
Layout.maximumWidth: 0.3 * header.width
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
placeholderText: qsTr("Choose custom homeserver")
|
||||
onTextChanged: publicRooms.setMatrixServer(text)
|
||||
}
|
||||
|
|
|
@ -20,8 +20,7 @@ ApplicationWindow {
|
|||
height: 650
|
||||
width: 420
|
||||
minimumHeight: 420
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
||||
Shortcut {
|
||||
|
@ -77,7 +76,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Sort by: ")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -94,7 +93,6 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
ScrollView {
|
||||
palette: Nheko.colors
|
||||
padding: Nheko.paddingMedium
|
||||
ScrollBar.horizontal.visible: false
|
||||
Layout.fillHeight: true
|
||||
|
@ -123,7 +121,7 @@ ApplicationWindow {
|
|||
height: memberLayout.implicitHeight + Nheko.paddingSmall * 2
|
||||
hoverEnabled: true
|
||||
background: Rectangle {
|
||||
color: del.hovered ? Nheko.colors.dark : roomMembersRoot.color
|
||||
color: del.hovered ? palette.dark : roomMembersRoot.color
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
@ -158,7 +156,7 @@ ApplicationWindow {
|
|||
|
||||
ElidedLabel {
|
||||
fullText: model.mxid
|
||||
color: del.hovered ? Nheko.colors.brightText : Nheko.colors.buttonText
|
||||
color: del.hovered ? palette.brightText : palette.buttonText
|
||||
font.pixelSize: Math.ceil(fontMetrics.font.pixelSize * 0.9)
|
||||
elideWidth: del.width - Nheko.paddingMedium * 2 - avatar.width - encryptInd.width
|
||||
Layout.fillWidth: true
|
||||
|
@ -184,7 +182,7 @@ ApplicationWindow {
|
|||
Layout.preferredHeight: 16
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: sourceUrl + (ma.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
|
||||
source: sourceUrl + (ma.hovered ? palette.highlight : palette.buttonText)
|
||||
ToolTip.visible: ma.hovered
|
||||
ToolTip.text: {
|
||||
if (isAdmin)
|
||||
|
|
|
@ -20,8 +20,7 @@ ApplicationWindow {
|
|||
minimumHeight: 450
|
||||
width: 450
|
||||
height: 680
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
modality: Qt.NonModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
title: qsTr("Room Settings")
|
||||
|
@ -79,7 +78,7 @@ ApplicationWindow {
|
|||
Spinner {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
visible: roomSettings.isLoading
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
running: roomSettings.isLoading
|
||||
}
|
||||
|
||||
|
@ -130,7 +129,7 @@ ApplicationWindow {
|
|||
textFormat: isNameEditingAllowed ? TextEdit.PlainText : TextEdit.RichText
|
||||
text: isNameEditingAllowed ? roomSettings.plainRoomName : roomSettings.roomName
|
||||
font.pixelSize: fontMetrics.font.pixelSize * 2
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.maximumWidth: parent.width - (Nheko.paddingSmall * 2) - nameChangeButton.anchors.leftMargin - (nameChangeButton.width * 2)
|
||||
|
@ -178,7 +177,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("%n member(s)", "", roomSettings.memberCount)
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ImageButton {
|
||||
|
@ -213,7 +212,7 @@ ApplicationWindow {
|
|||
wrapMode: TextEdit.WordWrap
|
||||
background: null
|
||||
selectByMouse: !Settings.mobileMode
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
horizontalAlignment: TextEdit.AlignHCenter
|
||||
onLinkActivated: Nheko.openLink(link)
|
||||
|
||||
|
@ -263,7 +262,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("SETTINGS")
|
||||
font.bold: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Item {
|
||||
|
@ -273,7 +272,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Notifications")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -289,7 +288,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Anyone can join")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
|
@ -303,7 +302,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Allow knocking")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
visible: knockingButton.visible
|
||||
}
|
||||
|
||||
|
@ -322,7 +321,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Allow joining via other rooms")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
visible: restrictedButton.visible
|
||||
}
|
||||
|
||||
|
@ -341,7 +340,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Rooms to join via")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
visible: allowedRoomsButton.visible
|
||||
}
|
||||
|
||||
|
@ -360,7 +359,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("Allow guests to join")
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
|
@ -383,7 +382,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Encryption")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
|
@ -422,7 +421,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Permission")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Button {
|
||||
|
@ -434,7 +433,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Aliases")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Button {
|
||||
|
@ -446,7 +445,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Sticker & Emote Settings")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Button {
|
||||
|
@ -458,7 +457,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Hidden events")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
HiddenEventsDialog {
|
||||
|
@ -487,7 +486,7 @@ ApplicationWindow {
|
|||
Label {
|
||||
text: qsTr("INFO")
|
||||
font.bold: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Item {
|
||||
|
@ -496,7 +495,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Internal ID")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
AbstractButton { // AbstractButton does not allow setting text color
|
||||
|
@ -507,7 +506,7 @@ ApplicationWindow {
|
|||
id: idLabel
|
||||
text: roomSettings.roomId
|
||||
font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 0.8)
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
wrapMode: Text.WrapAnywhere
|
||||
|
@ -531,14 +530,14 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
text: qsTr("Room Version")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Label {
|
||||
text: roomSettings.roomVersion
|
||||
font.pixelSize: fontMetrics.font.pixelSize
|
||||
Layout.alignment: Qt.AlignRight
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,8 +22,7 @@ ApplicationWindow {
|
|||
width: 420
|
||||
minimumWidth: 150
|
||||
minimumHeight: 150
|
||||
palette: Nheko.colors
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
title: profile.isGlobalUserProfile ? qsTr("Global User Profile") : qsTr("Room User Profile")
|
||||
modality: Qt.NonModal
|
||||
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
|
||||
|
@ -89,7 +88,7 @@ ApplicationWindow {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
running: profile.isLoading
|
||||
visible: profile.isLoading
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
|
||||
Text {
|
||||
|
@ -137,7 +136,7 @@ ApplicationWindow {
|
|||
readOnly: !isUsernameEditingAllowed
|
||||
text: profile.displayName
|
||||
font.pixelSize: 20
|
||||
color: TimelineManager.userColor(profile.userid, Nheko.colors.window)
|
||||
color: TimelineManager.userColor(profile.userid, palette.window)
|
||||
font.bold: true
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.maximumWidth: parent.width - (Nheko.paddingSmall * 2) - usernameChangeButton.anchors.leftMargin - (usernameChangeButton.width * 2)
|
||||
|
@ -315,7 +314,6 @@ ApplicationWindow {
|
|||
|
||||
onCurrentIndexChanged: devicelist.selectedTab = currentIndex
|
||||
|
||||
palette: Nheko.colors
|
||||
|
||||
NhekoTabButton {
|
||||
text: qsTr("Devices")
|
||||
|
@ -354,7 +352,7 @@ ApplicationWindow {
|
|||
Layout.alignment: Qt.AlignLeft
|
||||
elide: Text.ElideRight
|
||||
font.bold: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
text: deviceId
|
||||
}
|
||||
|
||||
|
@ -400,7 +398,7 @@ ApplicationWindow {
|
|||
|
||||
readOnly: !deviceNameRow.isEditingAllowed
|
||||
text: deviceName
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.fillWidth: true
|
||||
selectByMouse: true
|
||||
|
@ -435,7 +433,7 @@ ApplicationWindow {
|
|||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
elide: Text.ElideRight
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
text: qsTr("Last seen %1 from %2").arg(new Date(lastTs).toLocaleString(Locale.ShortFormat)).arg(lastIp ? lastIp : "???")
|
||||
}
|
||||
|
||||
|
@ -504,7 +502,7 @@ ApplicationWindow {
|
|||
|
||||
ElidedLabel {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
Layout.fillWidth: true
|
||||
elideWidth: width
|
||||
fullText: roomName
|
||||
|
@ -527,7 +525,7 @@ ApplicationWindow {
|
|||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,14 +13,13 @@ Menu {
|
|||
id: stickerPopup
|
||||
|
||||
property var callback
|
||||
property var colors
|
||||
property string roomid
|
||||
property alias model: gridView.model
|
||||
required property bool emoji
|
||||
property var textArea
|
||||
property real highlightHue: Nheko.colors.highlight.hslHue
|
||||
property real highlightSat: Nheko.colors.highlight.hslSaturation
|
||||
property real highlightLight: Nheko.colors.highlight.hslLightness
|
||||
property real highlightHue: palette.highlight.hslHue
|
||||
property real highlightSat: palette.highlight.hslSaturation
|
||||
property real highlightLight: palette.highlight.hslLightness
|
||||
readonly property int stickerDim: emoji ? 48 : 128
|
||||
readonly property int stickerDimPad: stickerDim + Nheko.paddingSmall
|
||||
readonly property int stickersPerRow: emoji ? 7 : 3
|
||||
|
@ -44,7 +43,7 @@ Menu {
|
|||
width: sidebarAvatarSize + Nheko.paddingSmall + stickersPerRow * stickerDimPad + 20
|
||||
|
||||
Rectangle {
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
height: columnView.implicitHeight + Nheko.paddingSmall*2
|
||||
width: sidebarAvatarSize + Nheko.paddingSmall + stickersPerRow * stickerDimPad + 20
|
||||
|
||||
|
@ -66,10 +65,8 @@ Menu {
|
|||
Layout.preferredWidth: stickersPerRow * stickerDimPad + 20 - Nheko.paddingSmall
|
||||
Layout.row: 0
|
||||
Layout.column: 1
|
||||
palette: Nheko.colors
|
||||
background: null
|
||||
placeholderTextColor: Nheko.colors.buttonText
|
||||
color: Nheko.colors.text
|
||||
placeholderTextColor: palette.buttonText
|
||||
placeholderText: qsTr("Search")
|
||||
selectByMouse: true
|
||||
rightPadding: clearSearch.width
|
||||
|
@ -125,7 +122,7 @@ Menu {
|
|||
section.delegate: Rectangle {
|
||||
width: gridView.width
|
||||
height: childrenRect.height
|
||||
color: Nheko.colors.alternateBase
|
||||
color: palette.alternateBase
|
||||
|
||||
required property string section
|
||||
|
||||
|
@ -133,7 +130,6 @@ Menu {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: parent.section
|
||||
color: Nheko.colors.text
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +192,6 @@ Menu {
|
|||
font.family: Settings.emojiFont
|
||||
font.pixelSize: 36
|
||||
text: del.modelData.unicode.replace('\ufe0f', '')
|
||||
color: Nheko.colors.text
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,7 +208,7 @@ Menu {
|
|||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: hovered ? Nheko.colors.highlight : 'transparent'
|
||||
color: hovered ? palette.highlight : 'transparent'
|
||||
radius: 5
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ Item {
|
|||
id: scroll
|
||||
|
||||
clip: false
|
||||
palette: Nheko.colors
|
||||
ScrollBar.horizontal.visible: false
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -71,7 +70,7 @@ Item {
|
|||
|
||||
visible: running
|
||||
running: login.lookingUpHs
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,7 +126,7 @@ Item {
|
|||
|
||||
visible: running
|
||||
running: login.loggingIn
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ Item {
|
|||
id: scroll
|
||||
|
||||
clip: false
|
||||
palette: Nheko.colors
|
||||
ScrollBar.horizontal.visible: false
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -70,7 +69,7 @@ Item {
|
|||
|
||||
visible: running
|
||||
running: regis.lookingUpHs
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +101,7 @@ Item {
|
|||
|
||||
visible: running
|
||||
running: regis.lookingUpUsername
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
|
||||
Image {
|
||||
|
@ -178,7 +177,7 @@ Item {
|
|||
|
||||
visible: running
|
||||
running: regis.registering
|
||||
foreground: Nheko.colors.mid
|
||||
foreground: palette.mid
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,12 +16,11 @@ Rectangle {
|
|||
|
||||
property int collapsePoint: 600
|
||||
property bool collapsed: width < collapsePoint
|
||||
color: Nheko.colors.window
|
||||
color: palette.window
|
||||
|
||||
ScrollView {
|
||||
id: scroll
|
||||
|
||||
palette: Nheko.colors
|
||||
ScrollBar.horizontal.visible: false
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: (collapsed? backButton.height : 0)+Nheko.paddingLarge
|
||||
|
@ -51,7 +50,7 @@ Rectangle {
|
|||
Label {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
text: model.name
|
||||
//Layout.column: 0
|
||||
Layout.columnSpan: (model.type == UserSettingsModel.SectionTitle && !userSettingsDialog.collapsed) ? 2 : 1
|
||||
|
@ -159,7 +158,7 @@ Rectangle {
|
|||
DelegateChoice {
|
||||
roleValue: UserSettingsModel.ReadOnlyText
|
||||
TextEdit {
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
text: model.value
|
||||
readOnly: true
|
||||
selectByMouse: !Settings.mobileMode
|
||||
|
@ -176,7 +175,7 @@ Rectangle {
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
height: 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ ColumnLayout {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Welcome to nheko! The desktop client for the Matrix protocol.")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
font.pointSize: fontMetrics.font.pointSize*2
|
||||
wrapMode: Text.Wrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
@ -38,7 +38,7 @@ ColumnLayout {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Enjoy your stay!")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
font.pointSize: fontMetrics.font.pointSize*1.5
|
||||
wrapMode: Text.Wrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
@ -86,7 +86,7 @@ ColumnLayout {
|
|||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.margins: Nheko.paddingLarge
|
||||
text: qsTr("Reduce animations")
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
|
||||
HoverHandler {
|
||||
id: hovered
|
||||
|
|
|
@ -9,7 +9,7 @@ import im.nheko 1.0
|
|||
Slider {
|
||||
id: control
|
||||
|
||||
property color progressColor: Nheko.colors.highlight
|
||||
property color progressColor: palette.highlight
|
||||
property bool alwaysShowSlider: true
|
||||
property int sliderRadius: 16
|
||||
|
||||
|
@ -25,7 +25,7 @@ Slider {
|
|||
width: control.availableWidth - handle.width
|
||||
height: implicitHeight
|
||||
radius: height / 2
|
||||
color: Nheko.colors.buttonText
|
||||
color: palette.buttonText
|
||||
|
||||
Rectangle {
|
||||
width: control.visualPosition * parent.width
|
||||
|
|
|
@ -20,7 +20,7 @@ Item {
|
|||
PointHandler {
|
||||
id: ph
|
||||
|
||||
onGrabChanged: {
|
||||
onGrabChanged: (_, point) => {
|
||||
circle.centerX = point.position.x
|
||||
circle.centerY = point.position.y
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ Popup {
|
|||
padding: Nheko.paddingLarge
|
||||
|
||||
contentItem: Label {
|
||||
color: Nheko.colors.light
|
||||
color: palette.light
|
||||
width: Math.max(Overlay.overlay? Overlay.overlay.width/2 : 0, 400)
|
||||
text: snackbar.currentMessage
|
||||
font.bold: true
|
||||
|
@ -53,7 +53,7 @@ Popup {
|
|||
|
||||
background: Rectangle {
|
||||
radius: Nheko.paddingLarge
|
||||
color: Nheko.colors.dark
|
||||
color: palette.dark
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ Rectangle {
|
|||
}
|
||||
|
||||
color: {
|
||||
var wc = Nheko.colors.alternateBase;
|
||||
var wc = palette.alternateBase;
|
||||
return Qt.rgba(wc.r, wc.g, wc.b, 0.5);
|
||||
}
|
||||
opacity: control.shouldShowControls ? 1 : 0
|
||||
|
@ -95,7 +95,7 @@ Rectangle {
|
|||
id: playbackStateImage
|
||||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
buttonTextColor: Nheko.colors.text
|
||||
buttonTextColor: palette.text
|
||||
Layout.preferredHeight: 24
|
||||
Layout.preferredWidth: 24
|
||||
image: {
|
||||
|
@ -115,7 +115,7 @@ Rectangle {
|
|||
id: volumeButton
|
||||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
buttonTextColor: Nheko.colors.text
|
||||
buttonTextColor: palette.text
|
||||
Layout.preferredHeight: 24
|
||||
Layout.preferredWidth: 24
|
||||
image: {
|
||||
|
@ -214,7 +214,7 @@ Rectangle {
|
|||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: (!control.mediaLoaded ? "-- " : durationToString(control.positionValue)) + " / " + durationToString(control.duration)
|
||||
color: Nheko.colors.text
|
||||
color: palette.text
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
|
@ -9,7 +9,6 @@ import im.nheko 1.0
|
|||
|
||||
Popup {
|
||||
modal: true
|
||||
palette: Nheko.colors
|
||||
// only set the anchors on Qt 5.12 or higher
|
||||
// see https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html#anchors.centerIn-prop
|
||||
Component.onCompleted: {
|
||||
|
@ -31,7 +30,7 @@ Popup {
|
|||
Image {
|
||||
Layout.preferredWidth: 22
|
||||
Layout.preferredHeight: 22
|
||||
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.svg?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.svg?" + palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -49,7 +48,7 @@ Popup {
|
|||
Image {
|
||||
Layout.preferredWidth: 22
|
||||
Layout.preferredHeight: 22
|
||||
source: "image://colorimage/:/icons/icons/ui/video-call.svg?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/:/icons/icons/ui/video-call.svg?" + palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -81,8 +80,8 @@ Popup {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
border.color: Nheko.colors.windowText
|
||||
color: palette.window
|
||||
border.color: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ Popup {
|
|||
closePolicy: Popup.NoAutoClose
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
palette: Nheko.colors
|
||||
|
||||
Component {
|
||||
id: deviceError
|
||||
|
@ -45,7 +44,7 @@ Popup {
|
|||
Layout.fillWidth: true
|
||||
text: CallManager.callPartyDisplayName
|
||||
font.pointSize: fontMetrics.font.pointSize * 2
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
|
@ -68,14 +67,14 @@ Popup {
|
|||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.preferredWidth: callInv.height / 10
|
||||
Layout.preferredHeight: callInv.height / 10
|
||||
source: "image://colorimage/" + image + "?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/" + image + "?" + palette.windowText
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: CallManager.callType == CallType.VIDEO ? qsTr("Video Call") : qsTr("Voice Call")
|
||||
font.pointSize: fontMetrics.font.pointSize * 2
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -94,7 +93,7 @@ Popup {
|
|||
Image {
|
||||
Layout.preferredWidth: deviceCombos.imageSize
|
||||
Layout.preferredHeight: deviceCombos.imageSize
|
||||
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.svg?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.svg?" + palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -113,7 +112,7 @@ Popup {
|
|||
Image {
|
||||
Layout.preferredWidth: deviceCombos.imageSize
|
||||
Layout.preferredHeight: deviceCombos.imageSize
|
||||
source: "image://colorimage/:/icons/icons/ui/video.svg?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/:/icons/icons/ui/video.svg?" + palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -201,8 +200,8 @@ Popup {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
border.color: Nheko.colors.windowText
|
||||
color: palette.window
|
||||
border.color: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -90,7 +90,6 @@ Rectangle {
|
|||
Layout.rightMargin: 4
|
||||
icon.source: CallManager.callType == CallType.VIDEO ? "qrc:/icons/icons/ui/video.svg" : "qrc:/icons/icons/ui/place-call.svg"
|
||||
text: qsTr("Accept")
|
||||
palette: Nheko.colors
|
||||
onClicked: {
|
||||
if (CallManager.mics.length == 0) {
|
||||
var dialog = deviceError.createObject(timelineRoot, {
|
||||
|
@ -126,7 +125,6 @@ Rectangle {
|
|||
Layout.rightMargin: 16
|
||||
icon.source: "qrc:/icons/icons/ui/end-call.svg"
|
||||
text: qsTr("Decline")
|
||||
palette: Nheko.colors
|
||||
onClicked: {
|
||||
CallManager.rejectInvite();
|
||||
}
|
||||
|
|
|
@ -24,19 +24,19 @@ Popup {
|
|||
Image {
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 16
|
||||
source: "image://colorimage/" + image + "?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/" + image + "?" + palette.windowText
|
||||
}
|
||||
|
||||
Label {
|
||||
text: errorString
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
border.color: Nheko.colors.windowText
|
||||
color: palette.window
|
||||
border.color: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ Popup {
|
|||
anchors.centerIn = parent;
|
||||
|
||||
}
|
||||
palette: Nheko.colors
|
||||
|
||||
Component {
|
||||
id: deviceError
|
||||
|
@ -38,7 +37,7 @@ Popup {
|
|||
|
||||
Label {
|
||||
text: qsTr("Place a call to %1?").arg(room.roomName)
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
}
|
||||
|
||||
Item {
|
||||
|
@ -138,7 +137,7 @@ Popup {
|
|||
Image {
|
||||
Layout.preferredWidth: 22
|
||||
Layout.preferredHeight: 22
|
||||
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.svg?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/:/icons/icons/ui/microphone-unmute.svg?" + palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -159,7 +158,7 @@ Popup {
|
|||
Image {
|
||||
Layout.preferredWidth: 22
|
||||
Layout.preferredHeight: 22
|
||||
source: "image://colorimage/:/icons/icons/ui/video.svg?" + Nheko.colors.windowText
|
||||
source: "image://colorimage/:/icons/icons/ui/video.svg?" + palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -176,8 +175,8 @@ Popup {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
border.color: Nheko.colors.windowText
|
||||
color: palette.window
|
||||
border.color: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ Popup {
|
|||
Component.onDestruction: {
|
||||
CallManager.closeScreenShare();
|
||||
}
|
||||
palette: Nheko.colors
|
||||
|
||||
ColumnLayout {
|
||||
Label {
|
||||
|
@ -29,7 +28,7 @@ Popup {
|
|||
Layout.rightMargin: 8
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Share desktop with %1?").arg(room.roomName)
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
@ -40,7 +39,7 @@ Popup {
|
|||
Label {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Method:")
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -60,7 +59,7 @@ Popup {
|
|||
Label {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Window:")
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -91,7 +90,7 @@ Popup {
|
|||
Label {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
text: qsTr("Frame rate:")
|
||||
color: Nheko.colors.windowText
|
||||
color: palette.windowText
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
|
@ -191,8 +190,8 @@ Popup {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: Nheko.colors.window
|
||||
border.color: Nheko.colors.windowText
|
||||
color: palette.window
|
||||
border.color: palette.windowText
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1033,12 +1033,12 @@ MediaUpload::MediaUpload(std::unique_ptr<QIODevice> source_,
|
|||
}
|
||||
|
||||
connect(mediaPlayer,
|
||||
&QMediaPlayer::error,
|
||||
&QMediaPlayer::errorOccurred,
|
||||
this,
|
||||
[mediaPlayer]() {
|
||||
[](QMediaPlayer::Error error, QString errorString) {
|
||||
nhlog::ui()->debug("Media player error {} and errorStr {}",
|
||||
mediaPlayer->error(),
|
||||
mediaPlayer->errorString().toStdString());
|
||||
error,
|
||||
errorString.toStdString());
|
||||
});
|
||||
connect(mediaPlayer,
|
||||
&QMediaPlayer::mediaStatusChanged,
|
||||
|
|
|
@ -25,13 +25,14 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
|
|||
{
|
||||
connect(this, &MxcMediaProxy::eventIdChanged, &MxcMediaProxy::startDownload);
|
||||
connect(this, &MxcMediaProxy::roomChanged, &MxcMediaProxy::startDownload);
|
||||
connect(this,
|
||||
&MxcMediaProxy::error,
|
||||
[this]() {
|
||||
nhlog::ui()->info("Media player error {} and errorStr {}",
|
||||
error(),
|
||||
this->errorString().toStdString());
|
||||
});
|
||||
connect(this,
|
||||
&QMediaPlayer::errorOccurred,
|
||||
this,
|
||||
[](QMediaPlayer::Error error, QString errorString) {
|
||||
nhlog::ui()->debug("Media player error {} and errorStr {}",
|
||||
error,
|
||||
errorString.toStdString());
|
||||
});
|
||||
connect(this, &MxcMediaProxy::mediaStatusChanged, [this](QMediaPlayer::MediaStatus status) {
|
||||
nhlog::ui()->info("Media player status {} and error {}", status, this->error());
|
||||
});
|
||||
|
|
|
@ -173,11 +173,11 @@ CallManager::CallManager(QObject *parent)
|
|||
});
|
||||
|
||||
connect(&player_,
|
||||
&QMediaPlayer::error,
|
||||
&QMediaPlayer::errorOccurred,
|
||||
this,
|
||||
[this]() {
|
||||
[this](QMediaPlayer::Error error, QString errorString) {
|
||||
stopRingtone();
|
||||
switch (player_.error()) {
|
||||
switch (error) {
|
||||
case QMediaPlayer::FormatError:
|
||||
case QMediaPlayer::ResourceError:
|
||||
nhlog::ui()->error("WebRTC: valid ringtone file not found");
|
||||
|
@ -186,7 +186,7 @@ CallManager::CallManager(QObject *parent)
|
|||
nhlog::ui()->error("WebRTC: access to ringtone file denied");
|
||||
break;
|
||||
default:
|
||||
nhlog::ui()->error("WebRTC: unable to play ringtone");
|
||||
nhlog::ui()->error("WebRTC: unable to play ringtone, {}", errorString.toStdString());
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue