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

56 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-09 14:20:53 -04:00
onFocusChanged: findSomeone.forceActiveFocus()
2019-11-07 09:50:59 -04:00
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
2019-11-09 14:20:53 -04:00
currentIndex: 0
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
2019-11-09 14:20:53 -04:00
FindSomeone { id: findSomeone }
2019-11-09 09:52:16 -04:00
JoinRoom {}
2019-11-09 14:20:53 -04:00
CreateRoom {}
2019-11-07 09:50:59 -04:00
}
}
}