From fa12d3f4ece9124caaa7d406b5d324a93f3ae88c Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 12 May 2019 19:03:51 -0400 Subject: [PATCH] Adjust RoomSidePane autosize max width Set it to the RoomHeader's buttons implicitWidth --- harmonyqml/components/Chat/Chat.qml | 4 +++- harmonyqml/components/Chat/RoomHeader.qml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/harmonyqml/components/Chat/Chat.qml b/harmonyqml/components/Chat/Chat.qml index 9685e493..8350afc3 100644 --- a/harmonyqml/components/Chat/Chat.qml +++ b/harmonyqml/components/Chat/Chat.qml @@ -87,7 +87,9 @@ HColumnLayout { function set_width() { width = parent.width * 0.3 < collapseBelow ? - Layout.minimumWidth : Math.min(parent.width * 0.3, 300) + Layout.minimumWidth : + Math.min(parent.width * 0.3, + roomHeader.buttonsImplicitWidth) } onParentWidthChanged: diff --git a/harmonyqml/components/Chat/RoomHeader.qml b/harmonyqml/components/Chat/RoomHeader.qml index edc985bb..5dba5c4f 100644 --- a/harmonyqml/components/Chat/RoomHeader.qml +++ b/harmonyqml/components/Chat/RoomHeader.qml @@ -6,6 +6,8 @@ HRectangle { property string displayName: "" property string topic: "" + property alias buttonsImplicitWidth: viewButtons.implicitWidth + property bool collapseButtons: width < 400 id: roomHeader