Implement inviting to room

This commit is contained in:
miruka
2019-12-11 12:42:59 -04:00
parent fd2f8c9828
commit 001c643406
11 changed files with 259 additions and 26 deletions

View File

@@ -3,7 +3,7 @@ import QtQuick.Layouts 1.12
import "../utils.js" as Utils
Rectangle {
id: interfaceBox
id: box
color: theme.controls.box.background
implicitWidth: theme.controls.box.defaultWidth
implicitHeight: childrenRect.height
@@ -17,6 +17,10 @@ Rectangle {
property string focusButton: ""
property string clickButtonOnEnter: ""
property bool fillAvailableHeight: false
property HButton firstButton: null
default property alias body: interfaceBody.data
@@ -39,6 +43,11 @@ Rectangle {
id: mainColumn
width: parent.width
Binding on height {
value: box.height
when: box.fillAvailableHeight
}
HColumnLayout {
id: interfaceBody
spacing: theme.spacing * 1.5
@@ -56,6 +65,12 @@ Rectangle {
id: buttonRepeater
model: []
onItemAdded:
if (index === 0) firstButton = buttonRepeater.itemAt(0)
onItemRemoved:
if (index === 0) firstButton = null
HButton {
id: button
text: modelData.text

View File

@@ -9,7 +9,6 @@ Popup {
padding: 0
margins: theme.spacing
enter: Transition {
HScaleAnimator { from: 0; to: 1; overshoot: 4 }
}
@@ -22,4 +21,11 @@ Popup {
background: Rectangle {
color: theme.controls.popup.background
}
readonly property int maximumPreferredWidth:
window.width - leftMargin - rightMargin - leftInset - rightInset
readonly property int maximumPreferredHeight:
window.height - topMargin - bottomMargin - topInset - bottomInset
}

View File

@@ -25,6 +25,7 @@ ScrollView {
property alias placeholderText: textArea.placeholderText
property alias text: textArea.text
property alias area: textArea
property var focusItemOnTab: null
TextArea {
@@ -53,5 +54,8 @@ ScrollView {
event.modifiers & Qt.AltModifier ||
event.modifiers & Qt.MetaModifier
) event.accepted = true
KeyNavigation.priority: KeyNavigation.BeforeItem
KeyNavigation.tab: focusItemOnTab
}
}