fix: fix PopupMenu icon size to be back to 25 but customizable

This commit is contained in:
Jonathan Rainville 2020-07-10 14:49:14 -04:00 committed by Iuri Matias
parent c00843c94c
commit cbcab82e5d
2 changed files with 13 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import "../components"
Rectangle {
property string channelNameStr: "#" + chatsModel.activeChannel.id
property int iconSize: 13
id: chatTopBarContent
color: "white"
@ -124,12 +125,16 @@ Rectangle {
}
Action {
icon.source: "../../../img/close.svg"
icon.width: chatTopBarContent.iconSize
icon.height: chatTopBarContent.iconSize
//% "Clear history"
text: qsTrId("clear-history")
onTriggered: chatsModel.clearChatHistory(chatsModel.activeChannel.id)
}
Action {
icon.source: "../../../img/delete.svg"
icon.width: chatTopBarContent.iconSize
icon.height: chatTopBarContent.iconSize
icon.color: Style.current.red
text: qsTr("Delete Chat")
onTriggered: chatsModel.leaveActiveChat()
@ -143,18 +148,24 @@ Rectangle {
}
Action {
icon.source: "../../../img/group_chat.svg"
icon.width: chatTopBarContent.iconSize
icon.height: chatTopBarContent.iconSize
//% "Group Information"
text: qsTrId("group-information")
onTriggered: groupInfoPopup.open()
}
Action {
icon.source: "../../../img/close.svg"
icon.width: chatTopBarContent.iconSize
icon.height: chatTopBarContent.iconSize
//% "Clear history"
text: qsTrId("clear-history")
onTriggered: chatsModel.clearChatHistory(chatsModel.activeChannel.id)
}
Action {
icon.source: "../../../img/leave_chat.svg"
icon.width: chatTopBarContent.iconSize
icon.height: chatTopBarContent.iconSize
//% "Leave Group"
text: qsTrId("leave-group")
onTriggered: chatsModel.leaveActiveChat()

View File

@ -28,8 +28,8 @@ Menu {
anchors.leftMargin: Style.current.padding
anchors.verticalCenter: parent.verticalCenter
visible: false
width: 13
height: 13
width: popupMenuItem.action.icon.width ? popupMenuItem.action.icon.width : 25
height: popupMenuItem.action.icon.height ? popupMenuItem.action.icon.height : 25
}
ColorOverlay {