From ea2fb7f8df098e99e3a1e2898dda55abc34ea72a Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Thu, 25 Mar 2021 20:19:48 -0400 Subject: [PATCH 1/5] Add part/leave command --- src/timeline/InputBar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index 8a5e4346..b45827f6 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -482,6 +482,8 @@ InputBar::command(QString command, QString args) eventId, args.trimmed()); } else if (command == "join") { ChatPage::instance()->joinRoom(args); + } else if (command == "part" || command == "leave") { + MainWindow::instance()->openLeaveRoomDialog(room->roomId()); } else if (command == "invite") { ChatPage::instance()->inviteUser(args.section(' ', 0, 0), args.section(' ', 1, -1)); } else if (command == "kick") { From 32f5e3503763a9c0193a7cf003fe06cc63a55f32 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Thu, 25 Mar 2021 20:20:13 -0400 Subject: [PATCH 2/5] Use correct Qt version --- resources/qml/MatrixTextField.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/MatrixTextField.qml b/resources/qml/MatrixTextField.qml index db2c907b..3bcc9675 100644 --- a/resources/qml/MatrixTextField.qml +++ b/resources/qml/MatrixTextField.qml @@ -2,9 +2,9 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -import QtQuick 2.13 -import QtQuick.Controls 2.13 -import QtQuick.Layouts 1.13 +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.12 TextField { id: input From ae19dd2bc26dff93509da32781c0db15af47b4a1 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 26 Mar 2021 01:31:46 +0100 Subject: [PATCH 3/5] Disable horizontal scrollbar in timeline fixes #530 --- resources/qml/MessageView.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index d418c35e..d8230151 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -16,6 +16,8 @@ ScrollView { palette: colors padding: 8 + ScrollBar.horizontal.visible: false + ListView { id: chat From 583fd9b5ab17087af3dc984f897ec5c5e467db14 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 27 Mar 2021 01:17:58 +0100 Subject: [PATCH 4/5] Fix double click on video message --- .../qml/delegates/PlayableMediaMessage.qml | 68 ++++++++----------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml index 52277895..321f7d61 100644 --- a/resources/qml/delegates/PlayableMediaMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml @@ -2,6 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later +import "../" import QtMultimedia 5.6 import QtQuick 2.12 import QtQuick.Controls 2.1 @@ -107,20 +108,40 @@ Rectangle { width: parent.width spacing: 15 - Rectangle { + ImageButton { id: button - color: colors.window - radius: 22 - height: 44 - width: 44 + Layout.alignment: Qt.verticalCenter + //color: colors.window + //radius: 22 + height: 32 + width: 32 + z: 3 + image: ":/icons/icons/ui/arrow-pointing-down.png" + onClicked: { + switch (button.state) { + case "": + TimelineManager.timeline.cacheMedia(model.data.id); + break; + case "stopped": + media.play(); + console.log("play"); + button.state = "playing"; + break; + case "playing": + media.pause(); + console.log("pause"); + button.state = "stopped"; + break; + } + } states: [ State { name: "stopped" PropertyChanges { - target: img - source: "image://colorimage/:/icons/icons/ui/play-sign.png?" + colors.text + target: button + image: ":/icons/icons/ui/play-sign.png" } }, @@ -128,42 +149,13 @@ Rectangle { name: "playing" PropertyChanges { - target: img - source: "image://colorimage/:/icons/icons/ui/pause-symbol.png?" + colors.text + target: button + image: ":/icons/icons/ui/pause-symbol.png" } } ] - Image { - id: img - - anchors.centerIn: parent - z: 3 - source: "image://colorimage/:/icons/icons/ui/arrow-pointing-down.png?" + colors.text - fillMode: Image.Pad - } - - TapHandler { - onSingleTapped: { - switch (button.state) { - case "": - TimelineManager.timeline.cacheMedia(model.data.id); - break; - case "stopped": - media.play(); - console.log("play"); - button.state = "playing"; - break; - case "playing": - media.pause(); - console.log("pause"); - button.state = "stopped"; - break; - } - } - } - CursorShape { anchors.fill: parent cursorShape: Qt.PointingHandCursor From 1a448ae5849d4229df5cb36fad90a1bfd1d0e99f Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 27 Mar 2021 22:01:56 +0100 Subject: [PATCH 5/5] Remove delay when focusing quick switcher --- resources/qml/QuickSwitcher.qml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/resources/qml/QuickSwitcher.qml b/resources/qml/QuickSwitcher.qml index 8730f101..9f4691b6 100644 --- a/resources/qml/QuickSwitcher.qml +++ b/resources/qml/QuickSwitcher.qml @@ -12,13 +12,6 @@ Popup { property int textHeight: Math.round(Qt.application.font.pixelSize * 2.4) property int textMargin: Math.round(textHeight / 8) - function delay(delayTime, cb) { - timer.interval = delayTime; - timer.repeat = false; - timer.triggered.connect(cb); - timer.start(); - } - background: null width: Math.round(parent.width / 2) x: Math.round(parent.width / 2 - width / 2) @@ -29,9 +22,7 @@ Popup { palette: colors onOpened: { completerPopup.open(); - delay(200, function() { - roomTextInput.forceActiveFocus(); - }); + roomTextInput.forceActiveFocus(); } onClosed: { completerPopup.close(); @@ -93,10 +84,6 @@ Popup { target: completerPopup } - Timer { - id: timer - } - Overlay.modal: Rectangle { color: "#aa1E1E1E" }