mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
More qml cleanups
This commit is contained in:
parent
1512810303
commit
2b1c9af311
39 changed files with 198 additions and 284 deletions
|
@ -3,7 +3,6 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./components"
|
||||
import "./dialogs"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQml
|
||||
import QtQuick
|
||||
|
@ -71,12 +70,13 @@ Page {
|
|||
when: (communityItem.hovered || model.hidden) && !(Communities.currentTagId === model.id)
|
||||
|
||||
PropertyChanges {
|
||||
backgroundColor: palette.dark
|
||||
bubbleBackground: palette.highlight
|
||||
bubbleText: palette.highlightedText
|
||||
importantText: palette.brightText
|
||||
target: communityItem
|
||||
unimportantText: palette.brightText
|
||||
communityItem {
|
||||
backgroundColor: palette.dark
|
||||
bubbleBackground: palette.highlight
|
||||
bubbleText: palette.highlightedText
|
||||
importantText: palette.brightText
|
||||
unimportantText: palette.brightText
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
@ -84,12 +84,13 @@ Page {
|
|||
when: Communities.currentTagId == model.id
|
||||
|
||||
PropertyChanges {
|
||||
backgroundColor: palette.highlight
|
||||
bubbleBackground: palette.highlightedText
|
||||
bubbleText: palette.highlight
|
||||
importantText: palette.highlightedText
|
||||
target: communityItem
|
||||
unimportantText: palette.highlightedText
|
||||
communityItem {
|
||||
backgroundColor: palette.highlight
|
||||
bubbleBackground: palette.highlightedText
|
||||
bubbleText: palette.highlight
|
||||
importantText: palette.highlightedText
|
||||
unimportantText: palette.highlightedText
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -123,11 +124,9 @@ Page {
|
|||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: model.collapsed ? qsTr("Expand") : qsTr("Collapse")
|
||||
ToolTip.visible: hovered
|
||||
height: fontMetrics.lineSpacing
|
||||
hoverEnabled: true
|
||||
image: model.collapsed ? ":/icons/icons/ui/collapsed.svg" : ":/icons/icons/ui/expanded.svg"
|
||||
visible: !communitySidebar.collapsed && model.collapsible
|
||||
width: fontMetrics.lineSpacing
|
||||
|
||||
onClicked: model.collapsed = !model.collapsed
|
||||
}
|
||||
|
@ -142,7 +141,7 @@ Page {
|
|||
color: communityItem.backgroundColor
|
||||
displayName: model.displayName
|
||||
enabled: false
|
||||
height: avatarSize
|
||||
Layout.preferredHeight: avatarSize
|
||||
roomid: model.id
|
||||
textColor: model.avatarUrl?.startsWith(":/") == true ? communityItem.unimportantText : communityItem.importantText
|
||||
url: {
|
||||
|
@ -153,7 +152,7 @@ Page {
|
|||
else
|
||||
return "";
|
||||
}
|
||||
width: avatarSize
|
||||
Layout.preferredWidth: avatarSize
|
||||
|
||||
NotificationBubble {
|
||||
anchors.bottom: avatar.bottom
|
||||
|
|
|
@ -151,10 +151,10 @@ Control {
|
|||
Avatar {
|
||||
displayName: model.displayName
|
||||
enabled: false
|
||||
height: popup.avatarHeight
|
||||
Layout.preferredHeight: popup.avatarHeight
|
||||
Layout.preferredWidth: popup.avatarWidth
|
||||
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
userid: model.userid
|
||||
width: popup.avatarWidth
|
||||
}
|
||||
Label {
|
||||
color: model.index == popup.currentIndex ? palette.highlightedText : palette.text
|
||||
|
@ -183,11 +183,11 @@ Control {
|
|||
crop: false
|
||||
displayName: model.shortcode
|
||||
enabled: false
|
||||
height: popup.avatarHeight
|
||||
Layout.preferredHeight: popup.avatarHeight
|
||||
//userid: model.shortcode
|
||||
url: (model.url ? model.url : "").replace("mxc://", "image://MxcImage/")
|
||||
visible: !model.unicode
|
||||
width: popup.avatarWidth
|
||||
Layout.preferredWidth: popup.avatarWidth
|
||||
}
|
||||
Label {
|
||||
Layout.leftMargin: Nheko.paddingSmall
|
||||
|
@ -229,10 +229,10 @@ Control {
|
|||
Avatar {
|
||||
displayName: model.roomName
|
||||
enabled: false
|
||||
height: popup.avatarHeight
|
||||
Layout.preferredHeight: popup.avatarHeight
|
||||
roomid: model.roomid
|
||||
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
width: popup.avatarWidth
|
||||
Layout.preferredWidth: popup.avatarWidth
|
||||
}
|
||||
Label {
|
||||
color: model.index == popup.currentIndex ? palette.highlightedText : palette.text
|
||||
|
@ -253,10 +253,10 @@ Control {
|
|||
Avatar {
|
||||
displayName: model.roomName
|
||||
enabled: false
|
||||
height: popup.avatarHeight
|
||||
Layout.preferredHeight: popup.avatarHeight
|
||||
roomid: model.roomid
|
||||
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
width: popup.avatarWidth
|
||||
Layout.preferredWidth: popup.avatarWidth
|
||||
}
|
||||
Label {
|
||||
color: model.index == popup.currentIndex ? palette.highlightedText : palette.text
|
||||
|
|
|
@ -69,12 +69,10 @@ ColumnLayout {
|
|||
name: "focused"
|
||||
|
||||
PropertyChanges {
|
||||
target: labelC
|
||||
y: 0
|
||||
labelC.y: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
opacity: 1
|
||||
target: input
|
||||
input.opacity: 1
|
||||
}
|
||||
}
|
||||
transitions: Transition {
|
||||
|
@ -143,7 +141,7 @@ ColumnLayout {
|
|||
|
||||
Layout.fillWidth: true
|
||||
color: palette.highlight
|
||||
height: 1
|
||||
Layout.preferredHeight: 1
|
||||
|
||||
Rectangle {
|
||||
id: blackBar
|
||||
|
@ -159,8 +157,7 @@ ColumnLayout {
|
|||
when: input.activeFocus == true
|
||||
|
||||
PropertyChanges {
|
||||
target: blackBar
|
||||
width: blueBar.width
|
||||
blackBar.width: blueBar.width
|
||||
}
|
||||
}
|
||||
transitions: Transition {
|
||||
|
|
|
@ -46,12 +46,12 @@ Rectangle {
|
|||
Layout.margins: 8
|
||||
ToolTip.text: CallManager.isOnCall ? qsTr("Hang up") : (CallManager.isOnCallOnOtherDevice ? qsTr("Already on a call") : qsTr("Place a call"))
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
hoverEnabled: true
|
||||
image: CallManager.isOnCall ? ":/icons/icons/ui/end-call.svg" : ":/icons/icons/ui/place-call.svg"
|
||||
opacity: (CallManager.haveCallInvite || CallManager.isOnCallOnOtherDevice) ? 0.3 : 1
|
||||
visible: CallManager.callsSupported && showAllButtons
|
||||
width: 22
|
||||
Layout.preferredWidth: 22
|
||||
|
||||
onClicked: {
|
||||
if (room) {
|
||||
|
@ -74,11 +74,11 @@ Rectangle {
|
|||
Layout.margins: 8
|
||||
ToolTip.text: qsTr("Send a file")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/attach.svg"
|
||||
visible: showAllButtons
|
||||
width: 22
|
||||
Layout.preferredWidth: 22
|
||||
|
||||
onClicked: room.input.openFileSelection()
|
||||
|
||||
|
@ -395,11 +395,11 @@ Rectangle {
|
|||
Layout.margins: 8
|
||||
ToolTip.text: qsTr("Stickers")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/sticky-note-solid.svg"
|
||||
visible: showAllButtons
|
||||
width: 22
|
||||
Layout.preferredWidth: 22
|
||||
|
||||
onClicked: stickerPopup.visible ? stickerPopup.close() : stickerPopup.show(stickerButton, room.roomId, function (row) {
|
||||
room.input.sticker(row);
|
||||
|
@ -419,10 +419,10 @@ Rectangle {
|
|||
Layout.margins: 8
|
||||
ToolTip.text: qsTr("Emoji")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/smile.svg"
|
||||
width: 22
|
||||
Layout.preferredWidth: 22
|
||||
|
||||
onClicked: emojiPopup.visible ? emojiPopup.close() : emojiPopup.show(emojiButton, room.roomId, function (plaintext, markdown) {
|
||||
messageInput.insert(messageInput.cursorPosition, markdown);
|
||||
|
@ -441,10 +441,10 @@ Rectangle {
|
|||
Layout.rightMargin: 8
|
||||
ToolTip.text: qsTr("Send")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/send.svg"
|
||||
width: 22
|
||||
Layout.preferredWidth: 22
|
||||
|
||||
onClicked: {
|
||||
room.input.send();
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./components"
|
||||
import "./delegates"
|
||||
import "./emoji"
|
||||
import "./ui"
|
||||
import "./dialogs"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
|
@ -186,8 +183,6 @@ Item {
|
|||
visible: !button.showImage
|
||||
}
|
||||
Image {
|
||||
id: buttonImg
|
||||
|
||||
// Workaround, can't get icon.source working for now...
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
@ -212,7 +207,7 @@ Item {
|
|||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/edit.svg"
|
||||
visible: !!row.model && row.model.isEditable
|
||||
width: 16
|
||||
Layout.preferredWidth: 16
|
||||
|
||||
onClicked: {
|
||||
if (row.model.isEditable)
|
||||
|
@ -228,7 +223,7 @@ Item {
|
|||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/smile-add.svg"
|
||||
visible: room ? room.permissions.canSend(MtxEvent.Reaction) : false
|
||||
width: 16
|
||||
Layout.preferredWidth: 16
|
||||
|
||||
onClicked: emojiPopup.visible ? emojiPopup.close() : emojiPopup.show(reactButton, room.roomId, function (plaintext, markdown) {
|
||||
var event_id = row.model ? row.model.eventId : "";
|
||||
|
@ -243,7 +238,7 @@ Item {
|
|||
hoverEnabled: true
|
||||
image: (row.model && row.model.threadId) ? ":/icons/icons/ui/thread.svg" : ":/icons/icons/ui/new-thread.svg"
|
||||
visible: room ? room.permissions.canSend(MtxEvent.TextMessage) : false
|
||||
width: 16
|
||||
Layout.preferredWidth: 16
|
||||
|
||||
onClicked: room.thread = (row.model.threadId || row.model.eventId)
|
||||
}
|
||||
|
@ -254,7 +249,7 @@ Item {
|
|||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/reply.svg"
|
||||
visible: room ? room.permissions.canSend(MtxEvent.TextMessage) : false
|
||||
width: 16
|
||||
Layout.preferredWidth: 16
|
||||
|
||||
onClicked: room.reply = row.model.eventId
|
||||
}
|
||||
|
@ -266,7 +261,7 @@ Item {
|
|||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/go-to.svg"
|
||||
visible: !!row.model && filteredTimeline.filterByContent
|
||||
width: 16
|
||||
Layout.preferredWidth: 16
|
||||
|
||||
onClicked: {
|
||||
topBar.searchString = "";
|
||||
|
@ -281,7 +276,7 @@ Item {
|
|||
ToolTip.visible: hovered
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/options.svg"
|
||||
width: 16
|
||||
Layout.preferredWidth: 16
|
||||
|
||||
onClicked: messageContextMenuC.show(row.model.eventId, row.model.threadId, row.model.type, row.model.isSender, row.model.isEncrypted, row.model.isEditable, "", row.model.body, optionsButton)
|
||||
}
|
||||
|
@ -624,8 +619,7 @@ Item {
|
|||
name: ""
|
||||
|
||||
PropertyChanges {
|
||||
target: toEndButton
|
||||
width: 0
|
||||
toEndButton.width: 0
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
@ -633,8 +627,7 @@ Item {
|
|||
when: !chat.atYEnd
|
||||
|
||||
PropertyChanges {
|
||||
target: toEndButton
|
||||
width: toEndButton.fullWidth
|
||||
toEndButton.width: toEndButton.fullWidth
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -668,8 +661,6 @@ Item {
|
|||
rightMargin: Nheko.paddingMedium + (fullWidth - width) / 2
|
||||
}
|
||||
Image {
|
||||
id: buttonImg
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Nheko.paddingMedium
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
|
|
@ -50,24 +50,16 @@ Item {
|
|||
name: "Visible"
|
||||
|
||||
PropertyChanges {
|
||||
target: screenSaver
|
||||
visible: true
|
||||
}
|
||||
PropertyChanges {
|
||||
opacity: 1
|
||||
target: screenSaver
|
||||
screenSaver.visible: true
|
||||
screenSaver.opacity: 1
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "Invisible"
|
||||
|
||||
PropertyChanges {
|
||||
opacity: 0
|
||||
target: screenSaver
|
||||
}
|
||||
PropertyChanges {
|
||||
target: screenSaver
|
||||
visible: false
|
||||
screenSaver.opacity: 0
|
||||
screenSaver.visible: false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import im.nheko
|
||||
|
||||
Popup {
|
||||
id: quickSwitcher
|
||||
|
|
|
@ -27,7 +27,7 @@ Page {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.theme.separator
|
||||
height: 1
|
||||
Layout.preferredHeight: 1
|
||||
}
|
||||
Pane {
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
@ -48,10 +48,10 @@ Page {
|
|||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Start a new chat")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
Layout.preferredWidth: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/add-square-button.svg"
|
||||
width: 22
|
||||
|
||||
onClicked: roomJoinCreateMenu.open(parent)
|
||||
|
||||
|
@ -100,11 +100,11 @@ Page {
|
|||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Room directory")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
Layout.preferredWidth: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/room-directory.svg"
|
||||
visible: !collapsed
|
||||
width: 22
|
||||
|
||||
onClicked: {
|
||||
var win = roomDirectoryComponent.createObject(timelineRoot);
|
||||
|
@ -118,12 +118,12 @@ Page {
|
|||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Search rooms (Ctrl+K)")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
Layout.preferredWidth: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/search.svg"
|
||||
ripple: false
|
||||
visible: !collapsed
|
||||
width: 22
|
||||
|
||||
onClicked: {
|
||||
var component = Qt.createComponent("qrc:/resources/qml/QuickSwitcher.qml");
|
||||
|
@ -142,12 +142,12 @@ Page {
|
|||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("User settings")
|
||||
ToolTip.visible: hovered
|
||||
height: 22
|
||||
Layout.preferredHeight: 22
|
||||
Layout.preferredWidth: 22
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/settings.svg"
|
||||
ripple: false
|
||||
visible: !collapsed
|
||||
width: 22
|
||||
|
||||
onClicked: mainWindow.push(userSettingsPage)
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ Page {
|
|||
spacing: Nheko.paddingMedium
|
||||
|
||||
Avatar {
|
||||
id: avatar
|
||||
id: headerAvatar
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredHeight: fontMetrics.lineSpacing * 2
|
||||
|
@ -206,10 +206,9 @@ Page {
|
|||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: parent.width - avatar.width - logoutButton.width - Nheko.paddingMedium * 2
|
||||
Layout.preferredWidth: parent.width - headerAvatar.width - logoutButton.width - Nheko.paddingMedium * 2
|
||||
spacing: 0
|
||||
visible: !collapsed
|
||||
width: parent.width - avatar.width - logoutButton.width - Nheko.paddingMedium * 2
|
||||
|
||||
ElidedLabel {
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
@ -321,7 +320,7 @@ Page {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.theme.separator
|
||||
height: 2
|
||||
Layout.preferredHeight: 2
|
||||
}
|
||||
Rectangle {
|
||||
id: unverifiedStuffBubble
|
||||
|
@ -371,10 +370,10 @@ Page {
|
|||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Close")
|
||||
ToolTip.visible: closeUnverifiedBubble.hovered
|
||||
height: fontMetrics.font.pixelSize
|
||||
Layout.preferredHeight: fontMetrics.font.pixelSize
|
||||
hoverEnabled: true
|
||||
image: ":/icons/icons/ui/dismiss.svg"
|
||||
width: fontMetrics.font.pixelSize
|
||||
Layout.preferredWidth: fontMetrics.font.pixelSize
|
||||
|
||||
onClicked: unverifiedStuffBubble.visible = false
|
||||
}
|
||||
|
@ -400,7 +399,7 @@ Page {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.theme.separator
|
||||
height: 1
|
||||
Layout.preferredHeight: 1
|
||||
visible: unverifiedStuffBubble.visible
|
||||
}
|
||||
}
|
||||
|
@ -485,12 +484,13 @@ Page {
|
|||
when: roomItem.hovered && !((Rooms.currentRoom && roomId == Rooms.currentRoom.roomId) || Rooms.currentRoomPreview.roomid == roomId)
|
||||
|
||||
PropertyChanges {
|
||||
backgroundColor: palette.dark
|
||||
bubbleBackground: palette.highlight
|
||||
bubbleText: palette.highlightedText
|
||||
importantText: palette.brightText
|
||||
target: roomItem
|
||||
unimportantText: palette.brightText
|
||||
roomItem {
|
||||
backgroundColor: palette.dark
|
||||
bubbleBackground: palette.highlight
|
||||
bubbleText: palette.highlightedText
|
||||
importantText: palette.brightText
|
||||
unimportantText: palette.brightText
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
@ -498,12 +498,13 @@ Page {
|
|||
when: (Rooms.currentRoom && roomId == Rooms.currentRoom.roomId) || Rooms.currentRoomPreview.roomid == roomId
|
||||
|
||||
PropertyChanges {
|
||||
backgroundColor: palette.highlight
|
||||
bubbleBackground: palette.highlightedText
|
||||
bubbleText: palette.highlight
|
||||
importantText: palette.highlightedText
|
||||
target: roomItem
|
||||
unimportantText: palette.highlightedText
|
||||
roomItem {
|
||||
backgroundColor: palette.highlight
|
||||
bubbleBackground: palette.highlightedText
|
||||
bubbleText: palette.highlight
|
||||
importantText: palette.highlightedText
|
||||
unimportantText: palette.highlightedText
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -551,11 +552,11 @@ Page {
|
|||
Layout.alignment: Qt.AlignVCenter
|
||||
displayName: roomName
|
||||
enabled: false
|
||||
height: avatarSize
|
||||
roomid: roomId
|
||||
url: avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
userid: isDirect ? directChatOtherUserId : ""
|
||||
width: avatarSize
|
||||
Layout.preferredWidth: avatarSize
|
||||
Layout.preferredHeight: avatarSize
|
||||
|
||||
NotificationBubble {
|
||||
id: collapsedNotificationBubble
|
||||
|
@ -575,11 +576,10 @@ Page {
|
|||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.minimumWidth: 100
|
||||
Layout.preferredWidth: parent.width - avatar.width
|
||||
height: avatar.height
|
||||
Layout.preferredWidth: roomItem.width - avatar.width
|
||||
Layout.preferredHeight: avatar.height
|
||||
spacing: Nheko.paddingSmall
|
||||
visible: !collapsed
|
||||
width: roomItem.width - avatar.width
|
||||
|
||||
Item {
|
||||
id: titleRow
|
||||
|
|
|
@ -2,17 +2,12 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./delegates"
|
||||
import "./device-verification"
|
||||
import "./dialogs"
|
||||
import "./emoji"
|
||||
import "./pages"
|
||||
import "./voip"
|
||||
import "./ui"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
|
|
|
@ -2,15 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./components"
|
||||
import "./delegates"
|
||||
import "./emoji"
|
||||
import "./ui"
|
||||
import "./dialogs"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
|
@ -165,7 +158,7 @@ TimelineEvent {
|
|||
AbstractButton {
|
||||
id: messageBubble
|
||||
|
||||
anchors.left: (wrapper.isStateEvent || wrapper.isSender) ? undefined : parent.left
|
||||
anchors.left: (wrapper.isStateEvent || wrapper.isSender) ? undefined : parent.left // qmllint disable Quick.anchor-combinations
|
||||
anchors.right: (wrapper.isStateEvent || !wrapper.isSender) ? undefined : parent.right
|
||||
anchors.horizontalCenter: wrapper.isStateEvent ? parent.horizontalCenter : undefined
|
||||
|
||||
|
|
|
@ -2,15 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./components"
|
||||
import "./delegates"
|
||||
import "./emoji"
|
||||
import "./ui"
|
||||
import "./dialogs"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
|
|
|
@ -2,12 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./components"
|
||||
import "./delegates"
|
||||
import "./emoji"
|
||||
import "./ui"
|
||||
import "./dialogs"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.2
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./components"
|
||||
import "./delegates"
|
||||
import "./emoji"
|
||||
import "./ui"
|
||||
import "./dialogs"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
@ -33,24 +27,22 @@ RowLayout {
|
|||
|
||||
StatusIndicator {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.preferredHeight: parent.iconSize
|
||||
Layout.preferredWidth: parent.iconSize
|
||||
eventId: metadata.eventId
|
||||
height: parent.iconSize
|
||||
status: metadata.status
|
||||
width: parent.iconSize
|
||||
}
|
||||
Image {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.preferredHeight: parent.iconSize
|
||||
Layout.preferredWidth: parent.iconSize
|
||||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Edited")
|
||||
ToolTip.visible: editHovered.hovered
|
||||
height: parent.iconSize
|
||||
source: "image://colorimage/:/icons/icons/ui/edit.svg?" + ((metadata.eventId == metadata.room.edit) ? palette.highlight : palette.buttonText)
|
||||
sourceSize.height: parent.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.width: parent.iconSize * Screen.devicePixelRatio
|
||||
visible: metadata.isEdited || metadata.eventId == metadata.room.edit
|
||||
width: parent.iconSize
|
||||
Layout.preferredWidth: parent.iconSize
|
||||
Layout.preferredHeight: parent.iconSize
|
||||
HoverHandler {
|
||||
id: editHovered
|
||||
|
||||
|
@ -58,28 +50,26 @@ RowLayout {
|
|||
}
|
||||
ImageButton {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.preferredHeight: parent.iconSize
|
||||
Layout.preferredWidth: parent.iconSize
|
||||
ToolTip.delay: Nheko.tooltipDelay
|
||||
ToolTip.text: qsTr("Part of a thread")
|
||||
ToolTip.visible: hovered
|
||||
buttonTextColor: TimelineManager.userColor(metadata.threadId, palette.base)
|
||||
height: parent.iconSize
|
||||
image: ":/icons/icons/ui/thread.svg"
|
||||
visible: metadata.threadId
|
||||
width: parent.iconSize
|
||||
|
||||
onClicked: metadata.room.thread = threadId
|
||||
}
|
||||
EncryptionIndicator {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.preferredHeight: parent.iconSize
|
||||
Layout.preferredWidth: parent.iconSize
|
||||
encrypted: metadata.isEncrypted
|
||||
height: parent.iconSize
|
||||
sourceSize.height: parent.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.width: parent.iconSize * Screen.devicePixelRatio
|
||||
trust: metadata.trustlevel
|
||||
visible: metadata.room.isEncrypted
|
||||
width: parent.iconSize
|
||||
Layout.preferredWidth: parent.iconSize
|
||||
Layout.preferredHeight: parent.iconSize
|
||||
}
|
||||
Label {
|
||||
id: ts
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import Qt.labs.platform as Platform
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
|
|
|
@ -3,16 +3,12 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "./components"
|
||||
import "./delegates"
|
||||
import "./device-verification"
|
||||
import "./emoji"
|
||||
import "./ui"
|
||||
import "./voip"
|
||||
import Qt.labs.platform as Platform
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Particles
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
|
@ -90,7 +86,7 @@ Item {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.theme.separator
|
||||
height: 1
|
||||
implicitHeight: 1
|
||||
z: 3
|
||||
}
|
||||
Rectangle {
|
||||
|
@ -146,7 +142,7 @@ Item {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: Nheko.theme.separator
|
||||
height: 1
|
||||
implicitHeight: 1
|
||||
z: 3
|
||||
}
|
||||
UploadBox {
|
||||
|
@ -191,10 +187,10 @@ Item {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
displayName: parent.roomName
|
||||
enabled: false
|
||||
height: 130
|
||||
implicitHeight: 130
|
||||
roomid: parent.roomId
|
||||
url: parent.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
width: 130
|
||||
implicitWidth: 130
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
@ -296,11 +292,11 @@ Item {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
displayName: roomPreview?.inviterDisplayName ?? ""
|
||||
enabled: true
|
||||
height: 48
|
||||
implicitHeight: 48
|
||||
roomid: preview.roomId
|
||||
url: (roomPreview?.inviterAvatarUrl ?? "").replace("mxc://", "image://MxcImage/")
|
||||
userid: roomPreview?.inviterUserId ?? ""
|
||||
width: 48
|
||||
implicitWidth: 48
|
||||
|
||||
onClicked: TimelineManager.openGlobalUserProfile(roomPreview.inviterUserId)
|
||||
}
|
||||
|
|
|
@ -46,24 +46,20 @@ Switch {
|
|||
name: "off"
|
||||
|
||||
PropertyChanges {
|
||||
border.color: "#767676"
|
||||
target: track
|
||||
track.border.color: "#767676"
|
||||
}
|
||||
PropertyChanges {
|
||||
target: handle
|
||||
x: 0
|
||||
handle.x: 0
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "on"
|
||||
|
||||
PropertyChanges {
|
||||
border.color: palette.highlight
|
||||
target: track
|
||||
track.border.color: palette.highlight
|
||||
}
|
||||
PropertyChanges {
|
||||
target: handle
|
||||
x: indicatorItem.width - handle.width
|
||||
handle.x: indicatorItem.width - handle.width
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Rectangle {
|
||||
color: "red"
|
||||
|
@ -21,7 +21,7 @@ Rectangle {
|
|||
anchors.bottom: parent.bottom
|
||||
|
||||
Label {
|
||||
height: font.pixelSize * 2
|
||||
Layout.preferredHeight: font.pixelSize * 2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: col.emoji.emoji
|
||||
font.pixelSize: Qt.application.font.pixelSize * 2
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import ".."
|
||||
import "../components"
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import ".."
|
||||
import "../ui"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Window 2.13
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
ApplicationWindow {
|
||||
id: allowedDialog
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
import ".."
|
||||
import "../ui"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.2
|
||||
|
@ -39,8 +38,8 @@ ApplicationWindow {
|
|||
url: summary.roomAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
roomid: summary.roomid
|
||||
displayName: summary.roomName
|
||||
height: 130
|
||||
width: 130
|
||||
Layout.preferredHeight: 130
|
||||
Layout.preferredWidth: 130
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import ".."
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Window 2.13
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQml.Models 2.15
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import im.nheko
|
||||
|
||||
ApplicationWindow {
|
||||
id: createDirectRoot
|
||||
|
|
|
@ -137,8 +137,8 @@ ApplicationWindow {
|
|||
url: imagePack.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
displayName: imagePack.packname
|
||||
roomid: imagePack.statekey
|
||||
height: 130
|
||||
width: 130
|
||||
Layout.preferredHeight: 130
|
||||
Layout.preferredWidth: 130
|
||||
crop: false
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
|
@ -238,8 +238,8 @@ ApplicationWindow {
|
|||
url: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.Url).replace("mxc://", "image://MxcImage/") + "?scale"
|
||||
displayName: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode)
|
||||
roomid: displayName
|
||||
height: 130
|
||||
width: 130
|
||||
Layout.preferredHeight: 130
|
||||
Layout.preferredWidth: 130
|
||||
crop: false
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ ApplicationWindow {
|
|||
dialog.show();
|
||||
timelineRoot.destroyOnClose(dialog);
|
||||
}
|
||||
width: packlistC.width
|
||||
Layout.preferredWidth: packlistC.width
|
||||
visible: !packlist.containsAccountPack
|
||||
text: qsTr("Create account pack")
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ ApplicationWindow {
|
|||
dialog.show();
|
||||
timelineRoot.destroyOnClose(dialog);
|
||||
}
|
||||
width: packlistC.width
|
||||
Layout.preferredWidth: packlistC.width
|
||||
visible: room.permissions.canChange(MtxEvent.ImagePackInRoom)
|
||||
text: qsTr("New room pack")
|
||||
}
|
||||
|
@ -146,8 +146,8 @@ ApplicationWindow {
|
|||
url: packinfo.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
displayName: packinfo.packName
|
||||
roomid: packinfo.statekey
|
||||
height: 100
|
||||
width: 100
|
||||
Layout.preferredHeight: 100
|
||||
Layout.preferredWidth: 100
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
enabled: false
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
import ".."
|
||||
import "../components"
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import im.nheko
|
||||
|
||||
ApplicationWindow {
|
||||
id: inviteDialogRoot
|
||||
|
@ -180,7 +180,7 @@ ApplicationWindow {
|
|||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
visible: inviteesList.visible
|
||||
width: 1
|
||||
Layout.preferredWidth: 1
|
||||
color: Nheko.theme.separator
|
||||
}
|
||||
ListView {
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import Qt.labs.platform 1.1 as P
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import im.nheko 1.0
|
||||
import "../voip"
|
||||
import QtQuick
|
||||
import im.nheko
|
||||
|
||||
P.MessageDialog {
|
||||
id: leaveRoomRoot
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import Qt.labs.platform 1.1 as P
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import im.nheko
|
||||
|
||||
P.MessageDialog {
|
||||
id: logoutRoot
|
||||
|
|
|
@ -47,7 +47,7 @@ ApplicationWindow {
|
|||
|
||||
TabBar {
|
||||
id: bar
|
||||
width: parent.width
|
||||
Layout.preferredWidth: parent.width
|
||||
|
||||
NhekoTabButton {
|
||||
text: qsTr("Roles")
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import ".."
|
||||
import "../ui"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Window 2.13
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
ApplicationWindow {
|
||||
id: applyDialog
|
||||
|
|
|
@ -78,8 +78,8 @@ ApplicationWindow {
|
|||
Avatar {
|
||||
id: avatar
|
||||
|
||||
width: Nheko.avatarSize
|
||||
height: Nheko.avatarSize
|
||||
Layout.preferredWidth: Nheko.avatarSize
|
||||
Layout.preferredHeight: Nheko.avatarSize
|
||||
userid: model.mxid
|
||||
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
displayName: model.displayName
|
||||
|
|
|
@ -57,8 +57,9 @@ ApplicationWindow {
|
|||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.rightMargin: Nheko.paddingMedium
|
||||
width: avatarSize
|
||||
height: avatarSize
|
||||
Layout.preferredWidth: roomDirDelegate.avatarSize
|
||||
Layout.preferredHeight: roomDirDelegate.avatarSize
|
||||
|
||||
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
roomid: model.roomid
|
||||
displayName: model.name
|
||||
|
@ -70,8 +71,7 @@ ApplicationWindow {
|
|||
columns: 2
|
||||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
width: parent.width - avatar.width
|
||||
Layout.preferredWidth: parent.width - avatar.width
|
||||
Layout.preferredWidth: parent.width - roomAvatar.width
|
||||
|
||||
ElidedLabel {
|
||||
Layout.row: 0
|
||||
|
|
|
@ -37,8 +37,9 @@ ApplicationWindow {
|
|||
Avatar {
|
||||
id: roomAvatar
|
||||
|
||||
width: 130
|
||||
height: width
|
||||
Layout.preferredHeight: 130
|
||||
Layout.preferredWidth: 130
|
||||
|
||||
roomid: members.roomId
|
||||
displayName: members.roomName
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
@ -130,8 +131,8 @@ ApplicationWindow {
|
|||
Avatar {
|
||||
id: avatar
|
||||
|
||||
width: Nheko.avatarSize
|
||||
height: Nheko.avatarSize
|
||||
Layout.preferredWidth: Nheko.avatarSize
|
||||
Layout.preferredHeight: Nheko.avatarSize
|
||||
userid: model.mxid
|
||||
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
displayName: model.displayName
|
||||
|
|
|
@ -50,8 +50,8 @@ ApplicationWindow {
|
|||
url: roomSettings.roomAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
roomid: roomSettings.roomId
|
||||
displayName: roomSettings.roomName
|
||||
height: 130
|
||||
width: 130
|
||||
Layout.preferredHeight: 130
|
||||
Layout.preferredWidth: 130
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
onClicked: TimelineManager.openImageOverlay(null, roomSettings.roomAvatarUrl, "", 0, 0)
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import ".."
|
||||
import "../device-verification"
|
||||
import "../ui"
|
||||
import "../components"
|
||||
import QtQuick 2.15
|
||||
|
@ -56,8 +55,8 @@ ApplicationWindow {
|
|||
id: displayAvatar
|
||||
|
||||
url: profile.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
height: 130
|
||||
width: 130
|
||||
Layout.preferredHeight: 130
|
||||
Layout.preferredWidth: 130
|
||||
displayName: profile.displayName
|
||||
userid: profile.userid
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
@ -498,8 +497,8 @@ ApplicationWindow {
|
|||
Layout.leftMargin: Nheko.paddingMedium
|
||||
|
||||
property int avatarSize: Math.ceil(fontMetrics.lineSpacing * 1.6)
|
||||
height: avatarSize
|
||||
width: avatarSize
|
||||
Layout.preferredHeight: avatarSize
|
||||
Layout.preferredWidth: avatarSize
|
||||
url: avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
roomid: roomId
|
||||
displayName: roomName
|
||||
|
|
|
@ -45,8 +45,8 @@ Item {
|
|||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
source: "qrc:/logos/login.png"
|
||||
height: 128
|
||||
width: 128
|
||||
Layout.preferredHeight: 128
|
||||
Layout.preferredWidth: 128
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
@ -65,7 +65,7 @@ Item {
|
|||
|
||||
|
||||
Spinner {
|
||||
height: matrixIdLabel.height/2
|
||||
Layout.preferredHeight: matrixIdLabel.height/2
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
||||
visible: running
|
||||
|
@ -117,7 +117,7 @@ Item {
|
|||
}
|
||||
|
||||
Item {
|
||||
height: Nheko.avatarSize
|
||||
Layout.preferredHeight: Nheko.avatarSize
|
||||
Layout.fillWidth: true
|
||||
|
||||
Spinner {
|
||||
|
|
|
@ -45,8 +45,8 @@ Item {
|
|||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
source: "qrc:/logos/login.png"
|
||||
height: 128
|
||||
width: 128
|
||||
Layout.preferredHeight: 128
|
||||
Layout.preferredWidth: 128
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
@ -64,7 +64,7 @@ Item {
|
|||
|
||||
|
||||
Spinner {
|
||||
height: hsLabel.height/2
|
||||
Layout.preferredHeight: hsLabel.height/2
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
||||
visible: running
|
||||
|
@ -96,7 +96,7 @@ Item {
|
|||
onEditingFinished: regis.checkUsername(text)
|
||||
}
|
||||
Spinner {
|
||||
height: usernameLabel.height/2
|
||||
Layout.preferredHeight: usernameLabel.height/2
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
||||
visible: running
|
||||
|
@ -105,8 +105,6 @@ Item {
|
|||
}
|
||||
|
||||
Image {
|
||||
width: usernameLabel.height/2
|
||||
height: width
|
||||
Layout.preferredHeight: usernameLabel.height/2
|
||||
Layout.preferredWidth: usernameLabel.height/2
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
@ -168,7 +166,7 @@ Item {
|
|||
}
|
||||
|
||||
Item {
|
||||
height: Nheko.avatarSize
|
||||
Layout.preferredHeight: Nheko.avatarSize
|
||||
Layout.fillWidth: true
|
||||
|
||||
Spinner {
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
pragma ComponentBehavior: Bound
|
||||
import ".."
|
||||
import "../ui"
|
||||
import "../dialogs"
|
||||
import Qt.labs.platform as Platform
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
|
|
@ -18,8 +18,8 @@ ColumnLayout {
|
|||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
source: "qrc:/logos/splash.png"
|
||||
height: 256
|
||||
width: 256
|
||||
Layout.preferredHeight: 256
|
||||
Layout.preferredWidth: 256
|
||||
}
|
||||
|
||||
Label {
|
||||
|
|
|
@ -31,8 +31,8 @@ Rectangle {
|
|||
anchors.leftMargin: 8
|
||||
|
||||
Avatar {
|
||||
width: Nheko.avatarSize
|
||||
height: Nheko.avatarSize
|
||||
implicitWidth: Nheko.avatarSize
|
||||
implicitHeight: Nheko.avatarSize
|
||||
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
userid: CallManager.callParty
|
||||
displayName: CallManager.callPartyDisplayName
|
||||
|
@ -61,8 +61,7 @@ Rectangle {
|
|||
when: CallManager.callType == Voip.VOICE
|
||||
|
||||
PropertyChanges {
|
||||
target: callTypeIcon
|
||||
source: "qrc:/icons/icons/ui/place-call.svg"
|
||||
callTypeIcon.source: "qrc:/icons/icons/ui/place-call.svg"
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -71,8 +70,7 @@ Rectangle {
|
|||
when: CallManager.callType == Voip.VIDEO
|
||||
|
||||
PropertyChanges {
|
||||
target: callTypeIcon
|
||||
source: "qrc:/icons/icons/ui/video.svg"
|
||||
callTypeIcon.source: "qrc:/icons/icons/ui/video.svg"
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -81,8 +79,7 @@ Rectangle {
|
|||
when: CallManager.callType == Voip.SCREEN
|
||||
|
||||
PropertyChanges {
|
||||
target: callTypeIcon
|
||||
source: "qrc:/icons/icons/ui/screen-share.svg"
|
||||
callTypeIcon.source: "qrc:/icons/icons/ui/screen-share.svg"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -103,8 +100,7 @@ Rectangle {
|
|||
when: CallManager.callState == Voip.OFFERSENT
|
||||
|
||||
PropertyChanges {
|
||||
target: callStateLabel
|
||||
text: qsTr("Calling...")
|
||||
callStateLabel.text: qsTr("Calling...")
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -113,8 +109,7 @@ Rectangle {
|
|||
when: CallManager.callState == Voip.CONNECTING
|
||||
|
||||
PropertyChanges {
|
||||
target: callStateLabel
|
||||
text: qsTr("Connecting...")
|
||||
callStateLabel.text: qsTr("Connecting...")
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -123,8 +118,7 @@ Rectangle {
|
|||
when: CallManager.callState == Voip.ANSWERSENT
|
||||
|
||||
PropertyChanges {
|
||||
target: callStateLabel
|
||||
text: qsTr("Connecting...")
|
||||
callStateLabel.text: qsTr("Connecting...")
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -133,18 +127,15 @@ Rectangle {
|
|||
when: CallManager.callState == Voip.CONNECTED
|
||||
|
||||
PropertyChanges {
|
||||
target: callStateLabel
|
||||
text: "00:00"
|
||||
callStateLabel.text: "00:00"
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: callTimer
|
||||
startTime: Math.floor((new Date()).getTime() / 1000)
|
||||
callTimer.startTime: Math.floor((new Date()).getTime() / 1000)
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: stackLayout
|
||||
currentIndex: CallManager.callType != Voip.VOICE ? 1 : 0
|
||||
stackLayout.currentIndex: CallManager.callType != Voip.VOICE ? 1 : 0
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -153,13 +144,16 @@ Rectangle {
|
|||
when: CallManager.callState == Voip.DISCONNECTED
|
||||
|
||||
PropertyChanges {
|
||||
target: callStateLabel
|
||||
text: ""
|
||||
callStateLabel.text: ""
|
||||
}
|
||||
|
||||
// HACK(Nico): Somehow this causes a crash when not using the custom parser for that property change...
|
||||
//PropertyChanges {
|
||||
// stackLayout.currentIndex: 0
|
||||
//}
|
||||
PropertyChanges {
|
||||
target: stackLayout
|
||||
currentIndex: 0
|
||||
currentIndex: 0 // qmllint disable Quick.property-changes-parsed
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -202,8 +196,8 @@ Rectangle {
|
|||
|
||||
ImageButton {
|
||||
visible: CallManager.haveLocalPiP
|
||||
width: 24
|
||||
height: 24
|
||||
Layout.preferredWidth: 24
|
||||
Layout.preferredHeight: 24
|
||||
buttonTextColor: "#000000"
|
||||
image: ":/icons/icons/ui/picture-in-picture.svg"
|
||||
hoverEnabled: true
|
||||
|
@ -215,8 +209,8 @@ Rectangle {
|
|||
ImageButton {
|
||||
Layout.leftMargin: 8
|
||||
Layout.rightMargin: 16
|
||||
width: 24
|
||||
height: 24
|
||||
Layout.preferredWidth: 24
|
||||
Layout.preferredHeight: 24
|
||||
buttonTextColor: "#000000"
|
||||
image: CallManager.isMicMuted ? ":/icons/icons/ui/microphone-unmute.svg" : ":/icons/icons/ui/microphone-mute.svg"
|
||||
hoverEnabled: true
|
||||
|
|
|
@ -38,8 +38,8 @@ Rectangle {
|
|||
anchors.leftMargin: 8
|
||||
|
||||
Avatar {
|
||||
width: Nheko.avatarSize
|
||||
height: Nheko.avatarSize
|
||||
implicitWidth: Nheko.avatarSize
|
||||
implicitHeight: Nheko.avatarSize
|
||||
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||
userid: CallManager.callParty
|
||||
displayName: CallManager.callPartyDisplayName
|
||||
|
@ -72,8 +72,8 @@ Rectangle {
|
|||
|
||||
ImageButton {
|
||||
Layout.rightMargin: 16
|
||||
width: 20
|
||||
height: 20
|
||||
Layout.preferredWidth: 20
|
||||
Layout.preferredHeight: 20
|
||||
buttonTextColor: "#000000"
|
||||
image: ":/icons/icons/ui/settings.svg"
|
||||
hoverEnabled: true
|
||||
|
@ -82,7 +82,7 @@ Rectangle {
|
|||
onClicked: {
|
||||
var dialog = devicesDialog.createObject(timelineRoot);
|
||||
dialog.open();
|
||||
timelineRoot.destroyOnClose(dialog);
|
||||
timelineRoot.destroyOnClose(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue