Implement inviting to room
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user