From 48eac969765ab21da994a500d1f4dad5065ccf6a Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 21 Jul 2020 01:06:31 -0400 Subject: [PATCH] Add "Open externally" to media event context menu --- TODO.md | 1 - src/gui/Pages/Chat/Timeline/EventDelegate.qml | 7 +++++++ src/icons/thin/open-externally.svg | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/icons/thin/open-externally.svg diff --git a/TODO.md b/TODO.md index 55cffb93..a5f813b7 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,6 @@ # TODO - Image viewer: - - room avatar change event: test open, open externally, copy url & path - open externally in context menu in timeline thumbnail, also button - hflickable: support kinetic scrolling disabler diff --git a/src/gui/Pages/Chat/Timeline/EventDelegate.qml b/src/gui/Pages/Chat/Timeline/EventDelegate.qml index 06bdf4ad..37d07006 100644 --- a/src/gui/Pages/Chat/Timeline/EventDelegate.qml +++ b/src/gui/Pages/Chat/Timeline/EventDelegate.qml @@ -170,6 +170,13 @@ HColumnLayout { onTriggered: eventList.checkFromLastToHere(model.index) } + HMenuItem { + icon.name: "open-externally" + text: qsTr("Open externally") + visible: Boolean(model.media_url) + onTriggered: eventList.openMediaExternally(model) + } + HMenuItem { icon.name: "copy-local-path" text: qsTr("Copy local path") diff --git a/src/icons/thin/open-externally.svg b/src/icons/thin/open-externally.svg new file mode 100644 index 00000000..00901837 --- /dev/null +++ b/src/icons/thin/open-externally.svg @@ -0,0 +1,3 @@ + + +