fix: code review

This commit is contained in:
Richard Ramos 2020-05-29 14:38:11 -04:00 committed by Iuri Matias
parent 1c00bb2dff
commit 6f3b987346
3 changed files with 104 additions and 107 deletions

View File

@ -9,6 +9,11 @@ ModalPopup {
id: popup id: popup
title: qsTr("New chat") title: qsTr("New chat")
onOpened: {
chatKey.text = "";
chatKey.forceActiveFocus(Qt.MouseFocusReason)
}
Rectangle { Rectangle {
id: chatKeyBox id: chatKeyBox
height: 44 height: 44

View File

@ -10,6 +10,11 @@ ModalPopup {
id: popup id: popup
title: qsTr("Join public chat") title: qsTr("Join public chat")
onOpened: {
channelName.text = "";
channelName.forceActiveFocus(Qt.MouseFocusReason)
}
Row { Row {
id: description id: description
Layout.fillHeight: false Layout.fillHeight: false

View File

@ -4,26 +4,13 @@ import QtQuick.Layouts 1.3
import "../imports" import "../imports"
import "./" import "./"
Item { Popup {
function open(){ property string title: "Default Title"
popup.open()
channelName.text = "";
channelName.forceActiveFocus(Qt.MouseFocusReason)
}
function close(){
popup.close()
}
property alias title: modalDialogTitle.text
default property alias content : popupContent.children default property alias content : popupContent.children
property alias footer : footerContent.children
Popup {
id: popup id: popup
modal: true modal: true
property alias footer : footerContent.children
Overlay.modal: Rectangle { Overlay.modal: Rectangle {
color: "#60000000" color: "#60000000"
@ -42,7 +29,7 @@ Item {
contentItem: Item { contentItem: Item {
Text { Text {
id: modalDialogTitle id: modalDialogTitle
text: "Default Title" text: title
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
font.bold: true font.bold: true
@ -117,5 +104,5 @@ Item {
anchors.leftMargin: Theme.padding anchors.leftMargin: Theme.padding
} }
} }
}
} }