fix: menu styling

This commit is contained in:
Richard Ramos 2020-05-27 22:26:01 -04:00 committed by Iuri Matias
parent 7d19aaba6f
commit 2555eec8aa
3 changed files with 7 additions and 3 deletions

View File

@ -143,6 +143,7 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
addChatLbl.state = "rotated" addChatLbl.state = "rotated"
let x = addChatLbl.x + addChatLbl.width / 2 - newChatMenu.width / 2 let x = addChatLbl.x + addChatLbl.width / 2 - newChatMenu.width / 2

View File

@ -188,9 +188,9 @@ Item {
anchors.fill: parent anchors.fill: parent
onClicked : { onClicked : {
if(channelName.text === "") return; if(channelName.text === "") return;
chatsModel.joinChat(channelName.text);
chatsModel.joinChat(channelName.text) channelName.text = "";
popup.close() popup.close();
} }
} }
} }

View File

@ -19,7 +19,9 @@ Menu {
Item { Item {
id: menuIcon id: menuIcon
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.topMargin: 4
Image { Image {
fillMode: Image.Pad fillMode: Image.Pad
id: popupMenuItemIcon id: popupMenuItemIcon
@ -38,6 +40,7 @@ Menu {
Text { Text {
anchors.left: menuIcon.right anchors.left: menuIcon.right
anchors.leftMargin: 32 anchors.leftMargin: 32
topPadding: 4
text: popupMenuItem.text text: popupMenuItem.text
font: popupMenuItem.font font: popupMenuItem.font
color: popupMenuItem.highlighted ? Theme.white : Theme.black color: popupMenuItem.highlighted ? Theme.white : Theme.black