HDrawer: provide real visible size prop→fix issues

This commit is contained in:
miruka 2019-12-09 13:52:02 -04:00
parent 6627c6341a
commit 2e780d7c6a
3 changed files with 6 additions and 2 deletions

View File

@ -50,6 +50,8 @@ Drawer {
collapseExpandSize :
Math.max(minNormalSize, Math.min(normalSize, maxNormalSize))
readonly property int visibleSize: visible ? width * position : 0
readonly property bool horizontal:
edge === Qt.LeftEdge || edge === Qt.RightEdge

View File

@ -21,6 +21,8 @@ Item {
modelSources[["Room", userId]] || [], "room_id", roomId
) || "waiting"
readonly property alias roomSidePane: roomSidePane
onRoomInfoChanged: {
if (roomInfo.left) {
@ -37,7 +39,7 @@ Item {
HLoader {
anchors.rightMargin: roomSidePane.width * roomSidePane.position
anchors.rightMargin: roomSidePane.visibleWidth
anchors.fill: parent
visible: ! roomSidePane.hidden || anchors.rightMargin < width

View File

@ -61,7 +61,7 @@ Item {
HLoader {
id: pageLoader
anchors.fill: parent
anchors.leftMargin: sidePane.width * sidePane.position
anchors.leftMargin: sidePane.visibleSize
visible: ! sidePane.hidden || anchors.leftMargin < width
// onSourceChanged: if (sidePane.collapse) sidePane.close()