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

57 lines
1.1 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"
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.max(tabBar.contentWidth, swipeView.contentWidth)
2019-11-07 09:50:59 -04:00
TabBar {
id: tabBar
position: TabBar.Header
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
Layout.fillWidth: true
Item {}
2019-11-07 09:50:59 -04:00
Item {}
CreateRoom {
id: createRoom
}
}
}
}