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