mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Clean up design a bit
This commit is contained in:
parent
8236f6ba72
commit
65d85768d0
3 changed files with 18 additions and 15 deletions
|
@ -10,32 +10,30 @@ import im.nheko 1.0
|
||||||
Popup {
|
Popup {
|
||||||
id: forwardMessagePopup
|
id: forwardMessagePopup
|
||||||
|
|
||||||
|
property var mid
|
||||||
|
|
||||||
|
function setMessageEventId(mid_in) {
|
||||||
|
mid = mid_in;
|
||||||
|
}
|
||||||
|
|
||||||
x: Math.round(parent.width / 2 - width / 2)
|
x: Math.round(parent.width / 2 - width / 2)
|
||||||
y: Math.round(parent.height / 2 - height / 2)
|
y: Math.round(parent.height / 2 - height / 2)
|
||||||
modal: true
|
modal: true
|
||||||
palette: colors
|
palette: colors
|
||||||
parent: Overlay.overlay
|
parent: Overlay.overlay
|
||||||
|
width: implicitWidth >= (timelineRoot.width * 0.8) ? implicitWidth : (timelineRoot.width * 0.8)
|
||||||
width: implicitWidth >= 300 ? implicitWidth : 300
|
|
||||||
height: implicitHeight + completerPopup.height + padding * 2
|
height: implicitHeight + completerPopup.height + padding * 2
|
||||||
leftPadding: 10
|
leftPadding: 10
|
||||||
rightPadding: 10
|
rightPadding: 10
|
||||||
|
background: null
|
||||||
property var mid
|
|
||||||
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
completerPopup.open();
|
completerPopup.open();
|
||||||
roomTextInput.forceActiveFocus();
|
roomTextInput.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
onClosed: {
|
onClosed: {
|
||||||
completerPopup.close();
|
completerPopup.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function setMessageEventId(mid_in) {
|
|
||||||
mid = mid_in;
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: forwardColumn
|
id: forwardColumn
|
||||||
|
|
||||||
|
@ -47,6 +45,7 @@ Popup {
|
||||||
text: qsTr("Forward Message")
|
text: qsTr("Forward Message")
|
||||||
font.bold: true
|
font.bold: true
|
||||||
bottomPadding: 10
|
bottomPadding: 10
|
||||||
|
color: colors.text
|
||||||
}
|
}
|
||||||
|
|
||||||
Reply {
|
Reply {
|
||||||
|
@ -78,6 +77,7 @@ Popup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Completer {
|
Completer {
|
||||||
|
@ -102,11 +102,13 @@ Popup {
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
if (completerPopup.count > 0 && (completerPopup.currentIndex < 0 || completerPopup.currentIndex >= completerPopup.count))
|
if (completerPopup.count > 0 && (completerPopup.currentIndex < 0 || completerPopup.currentIndex >= completerPopup.count))
|
||||||
completerPopup.currentIndex = 0;
|
completerPopup.currentIndex = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
target: completerPopup
|
target: completerPopup
|
||||||
}
|
}
|
||||||
|
|
||||||
Overlay.modal: Rectangle {
|
Overlay.modal: Rectangle {
|
||||||
color: "#aa1E1E1E"
|
color: Qt.rgba(colors.window.r, colors.window.g, colors.window.b, 0.75)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -76,6 +76,7 @@ Page {
|
||||||
|
|
||||||
ForwardCompleter {
|
ForwardCompleter {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
|
@ -133,7 +134,7 @@ Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker || messageContextMenu.eventType == MtxEvent.TextMessage|| messageContextMenu.eventType == MtxEvent.LocationMessage || messageContextMenu.eventType == MtxEvent.EmoteMessage || messageContextMenu.eventType == MtxEvent.NoticeMessage
|
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker || messageContextMenu.eventType == MtxEvent.TextMessage || messageContextMenu.eventType == MtxEvent.LocationMessage || messageContextMenu.eventType == MtxEvent.EmoteMessage || messageContextMenu.eventType == MtxEvent.NoticeMessage
|
||||||
text: qsTr("Forward")
|
text: qsTr("Forward")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var forwardMess = forwardCompleterComponent.createObject(timelineRoot);
|
var forwardMess = forwardCompleterComponent.createObject(timelineRoot);
|
||||||
|
|
Loading…
Reference in a new issue