moment/src/qml/Pages/AddChat/AddChat.qml

59 lines
1.2 KiB
QML
Raw Normal View History

2019-11-07 09:50:59 -04:00
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import "../../Base"
import "../../utils.js" as Utils
2019-11-07 09:50:59 -04:00
HPage {
id: addChatPage
2019-11-07 09:50:59 -04:00
onFocusChanged: createRoom.forceActiveFocus()
property string userId
2019-11-07 10:41:10 -04:00
HColumnLayout {
2019-11-07 09:50:59 -04:00
Layout.alignment: Qt.AlignCenter
2019-11-07 10:41:10 -04:00
Layout.minimumWidth: Layout.maximumWidth
Layout.maximumWidth: Math.min(
parent.width,
Math.max(tabBar.contentWidth, swipeView.contentWidth),
)
2019-11-07 09:50:59 -04:00
HTabBar {
2019-11-07 09:50:59 -04:00
id: tabBar
currentIndex: 2
2019-11-07 09:50:59 -04:00
Layout.fillWidth: true
Repeater {
model: [
qsTr("Find someone"),
qsTr("Join room"),
qsTr("Create room"),
2019-11-07 09:50:59 -04:00
]
2019-11-07 10:41:10 -04:00
HTabButton {
2019-11-07 09:50:59 -04:00
text: modelData
}
}
}
SwipeView {
2019-11-07 10:41:10 -04:00
id: swipeView
2019-11-07 09:50:59 -04:00
clip: true
currentIndex: tabBar.currentIndex
interactive: false
2019-11-07 09:50:59 -04:00
Layout.fillWidth: true
Item {}
2019-11-07 09:50:59 -04:00
Item {}
CreateRoom {
id: createRoom
}
}
}
}