Fix room pane default size
This commit is contained in:
parent
588dc4eec3
commit
fe40d117b2
|
@ -6,13 +6,15 @@ import QtQuick.Layouts 1.12
|
||||||
|
|
||||||
HDrawer {
|
HDrawer {
|
||||||
id: pane
|
id: pane
|
||||||
defaultSize: buttonRepeater.summedImplicitWidth
|
defaultSize: buttonRepeater.count * buttonWidth
|
||||||
minimumSize:
|
minimumSize: buttonWidth
|
||||||
buttonRepeater.count > 0 ? buttonRepeater.itemAt(0).implicitWidth : 0
|
|
||||||
|
|
||||||
|
|
||||||
property color buttonsBackgroundColor
|
property color buttonsBackgroundColor
|
||||||
|
|
||||||
|
property int buttonWidth:
|
||||||
|
buttonRepeater.count > 0 ? buttonRepeater.itemAt(0).implicitWidth : 0
|
||||||
|
|
||||||
readonly property alias buttonRepeater: buttonRepeater
|
readonly property alias buttonRepeater: buttonRepeater
|
||||||
readonly property alias swipeView: swipeView
|
readonly property alias swipeView: swipeView
|
||||||
|
|
||||||
|
@ -33,7 +35,7 @@ HDrawer {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
populate: null
|
populate: null
|
||||||
|
|
||||||
HRepeater {
|
Repeater {
|
||||||
id: buttonRepeater
|
id: buttonRepeater
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,12 @@ MultiviewPane {
|
||||||
saveName: "roomPane"
|
saveName: "roomPane"
|
||||||
edge: Qt.RightEdge
|
edge: Qt.RightEdge
|
||||||
|
|
||||||
|
defaultSize:
|
||||||
|
(buttonRepeater.count - (roomPane.collapse ? 0 : 1)) * buttonWidth
|
||||||
|
|
||||||
|
buttonWidth:
|
||||||
|
buttonRepeater.count >= 1 ? buttonRepeater.itemAt(1).implicitWidth : 0
|
||||||
|
|
||||||
buttonsBackgroundColor: theme.chat.roomPane.topBar.background
|
buttonsBackgroundColor: theme.chat.roomPane.topBar.background
|
||||||
background: Rectangle { color: theme.chat.roomPane.background }
|
background: Rectangle { color: theme.chat.roomPane.background }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user