diff --git a/TODO.md b/TODO.md index 78cb3008..84e7aff4 100644 --- a/TODO.md +++ b/TODO.md @@ -5,6 +5,7 @@ - File format - Make all icon SVG files white/black, since we can now use ColorOverlay - Make the icon blue in EditAccount when hovering and no avatar set + - Remove the filled theme - Use [Animators](https://doc.qt.io/qt-5/qml-qtquick-animator.html) - Choose a better default easing type for animations @@ -33,6 +34,7 @@ - Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb` - UI + - Use a Loader for context menus - Make HListView scrollbars visible - Remove first html lists left margin - Adapt UI for small heights diff --git a/src/qml/Base/HMenu.qml b/src/qml/Base/HMenu.qml index 75595cbc..f96ba127 100644 --- a/src/qml/Base/HMenu.qml +++ b/src/qml/Base/HMenu.qml @@ -17,7 +17,7 @@ Menu { rightPadding = Math.max(item.rightPadding, rightPadding) } return Math.min( - result + leftPadding + rightPadding, theme.minimumSupportedWidth + result + leftPadding + rightPadding, window.width ) } diff --git a/src/qml/SidePane/DelegateRoom.qml b/src/qml/SidePane/DelegateRoom.qml index 21815608..fa9f98eb 100644 --- a/src/qml/SidePane/DelegateRoom.qml +++ b/src/qml/SidePane/DelegateRoom.qml @@ -77,10 +77,24 @@ HTileDelegate { } contextMenu: HMenu { + HMenuItem { + visible: invited + icon.name: "invite-accept" + text: qsTr("Accept %1's invite").arg(Utils.coloredNameHtml( + model.data.inviter_name, model.data.inviter_id + )) + label.textFormat: Text.StyledText + + onTriggered: py.callClientCoro( + model.user_id, "join", [model.data.room_id] + ) + } + HMenuItem { visible: ! model.data.left icon.name: invited ? "invite-decline" : "room-leave" text: invited ? qsTr("Decline invite") : qsTr("Leave") + onTriggered: py.callClientCoro( model.user_id, "room_leave", [model.data.room_id] ) @@ -89,6 +103,7 @@ HTileDelegate { HMenuItem { icon.name: "room-forget" text: qsTr("Forget") + onTriggered: py.callClientCoro( model.user_id, "room_forget", [model.data.room_id] )