Put RoomPane inside a loader
This commit is contained in:
parent
bd8fa997c4
commit
407396e01e
@ -23,14 +23,15 @@ Item {
|
|||||||
) || "waiting"
|
) || "waiting"
|
||||||
|
|
||||||
readonly property alias loader: loader
|
readonly property alias loader: loader
|
||||||
readonly property alias roomPane: roomPane
|
readonly property alias roomPane: roomPaneLoader.item
|
||||||
|
|
||||||
|
|
||||||
HLoader {
|
HLoader {
|
||||||
id: loader
|
id: loader
|
||||||
anchors.rightMargin: roomPane.visibleSize
|
anchors.rightMargin: ready ? roomPane.visibleSize : 0
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: ! roomPane.hidden || anchors.rightMargin < width
|
visible:
|
||||||
|
ready ? ! roomPane.hidden || anchors.rightMargin < width : true
|
||||||
onLoaded: if (chat.focus) item.composer.takeFocus()
|
onLoaded: if (chat.focus) item.composer.takeFocus()
|
||||||
|
|
||||||
source: ready ? "ChatPage.qml" : ""
|
source: ready ? "ChatPage.qml" : ""
|
||||||
@ -47,8 +48,12 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RoomPane {
|
HLoader {
|
||||||
|
id: roomPaneLoader
|
||||||
|
active: ready
|
||||||
|
sourceComponent: RoomPane {
|
||||||
id: roomPane
|
id: roomPane
|
||||||
referenceSizeParent: chat
|
referenceSizeParent: chat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -67,7 +67,7 @@ HColumnLayout {
|
|||||||
id: inviteButton
|
id: inviteButton
|
||||||
icon.name: "room-send-invite"
|
icon.name: "room-send-invite"
|
||||||
backgroundColor: theme.chat.roomPane.inviteButton.background
|
backgroundColor: theme.chat.roomPane.inviteButton.background
|
||||||
enabled: chat.ready ? chat.roomInfo.can_invite : false
|
enabled: chat.roomInfo.can_invite
|
||||||
|
|
||||||
toolTip.text:
|
toolTip.text:
|
||||||
enabled ?
|
enabled ?
|
||||||
|
Loading…
Reference in New Issue
Block a user