Adjust RoomSidePane autosize max width

Set it to the RoomHeader's buttons implicitWidth
This commit is contained in:
miruka 2019-05-12 19:03:51 -04:00
parent b35e635be4
commit fa12d3f4ec
2 changed files with 5 additions and 1 deletions

View File

@ -87,7 +87,9 @@ HColumnLayout {
function set_width() { function set_width() {
width = parent.width * 0.3 < collapseBelow ? 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: onParentWidthChanged:

View File

@ -6,6 +6,8 @@ HRectangle {
property string displayName: "" property string displayName: ""
property string topic: "" property string topic: ""
property alias buttonsImplicitWidth: viewButtons.implicitWidth
property bool collapseButtons: width < 400 property bool collapseButtons: width < 400
id: roomHeader id: roomHeader