adjust lobby

This commit is contained in:
notify 2023-03-20 15:25:23 +08:00
parent 139464be14
commit 9ec500f82c
2 changed files with 28 additions and 15 deletions

View File

@ -112,6 +112,8 @@ Item {
Button { Button {
text: qsTr("Join Server") text: qsTr("Join Server")
Layout.fillWidth: true Layout.fillWidth: true
display: AbstractButton.TextBesideIcon
icon.name: "go-next"
enabled: passwordEdit.text !== "" enabled: passwordEdit.text !== ""
onClicked: { onClicked: {
config.serverAddr = server_addr.editText; config.serverAddr = server_addr.editText;

View File

@ -172,17 +172,24 @@ Item {
*/ */
} }
Button {
anchors.bottom: buttonRow.top
anchors.right: parent.right
width: 120
display: AbstractButton.TextUnderIcon
icon.name: "media-playback-start"
text: Backend.translate("Create Room")
onClicked: {
lobby_dialog.source = "LobbyElement/CreateRoom.qml";
lobby_drawer.open();
config.observing = false;
}
}
RowLayout { RowLayout {
id: buttonRow
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
Button {
text: Backend.translate("Create Room")
onClicked: {
lobby_dialog.source = "LobbyElement/CreateRoom.qml";
lobby_drawer.open();
config.observing = false;
}
}
Button { Button {
text: Backend.translate("Generals Overview") text: Backend.translate("Generals Overview")
onClicked: { onClicked: {
@ -212,13 +219,17 @@ Item {
mainStack.push(mainWindow.aboutPage); mainStack.push(mainWindow.aboutPage);
} }
} }
Button { }
text: Backend.translate("Exit Lobby")
onClicked: { Button {
toast.show("Goodbye."); anchors.right: parent.right
Backend.quitLobby(); text: Backend.translate("Exit Lobby")
mainStack.pop(); display: AbstractButton.TextBesideIcon
} icon.name: "application-exit"
onClicked: {
toast.show("Goodbye.");
Backend.quitLobby();
mainStack.pop();
} }
} }