From 3c0f6f60c6061c18681c042892ab415cca997db4 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 17 Mar 2020 18:38:52 -0400 Subject: [PATCH] Add button to go back to chat in reduced main pane --- src/gui/MainPane/TopBar.qml | 14 ++++++++++++++ src/icons/thin/developer-console.svg | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/gui/MainPane/TopBar.qml b/src/gui/MainPane/TopBar.qml index cb49d565..38962da3 100644 --- a/src/gui/MainPane/TopBar.qml +++ b/src/gui/MainPane/TopBar.qml @@ -45,5 +45,19 @@ Rectangle { Layout.fillHeight: true } + + HButton { + visible: Layout.preferredWidth > 0 + backgroundColor: "transparent" + icon.name: "go-back-to-chat-from-main-pane" + toolTip.text: qsTr("Go back to room") + + onClicked: mainPane.toggleFocus() + + Layout.preferredWidth: mainPane.collapse ? implicitWidth : 0 + Layout.fillHeight: true + + Behavior on Layout.preferredWidth { HNumberAnimation {} } + } } } diff --git a/src/icons/thin/developer-console.svg b/src/icons/thin/developer-console.svg index d1cc9a6e..20afb2d9 100644 --- a/src/icons/thin/developer-console.svg +++ b/src/icons/thin/developer-console.svg @@ -1,3 +1,3 @@ - - + +