fix(StatusChatListCategoryItem): don't render menubutton with no popup
Fixes #153
This commit is contained in:
parent
209a208455
commit
1b30a45eb8
|
@ -31,6 +31,8 @@ Column {
|
||||||
title: statusChatListCategory.name
|
title: statusChatListCategory.name
|
||||||
opened: statusChatListCategory.opened
|
opened: statusChatListCategory.opened
|
||||||
|
|
||||||
|
showMenuButton: !!statusChatListCategory.popupMenu
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (mouse.button === Qt.RightButton) {
|
if (mouse.button === Qt.RightButton) {
|
||||||
highlighted = true
|
highlighted = true
|
||||||
|
|
|
@ -17,6 +17,8 @@ StatusListItem {
|
||||||
property bool opened: true
|
property bool opened: true
|
||||||
property bool highlighted: false
|
property bool highlighted: false
|
||||||
property bool showActionButtons: false
|
property bool showActionButtons: false
|
||||||
|
property bool showMenuButton: showActionButtons
|
||||||
|
property bool showAddButton: showActionButtons
|
||||||
property alias addButton: addButton
|
property alias addButton: addButton
|
||||||
property alias menuButton: menuButton
|
property alias menuButton: menuButton
|
||||||
property alias toggleButton: toggleButton
|
property alias toggleButton: toggleButton
|
||||||
|
@ -40,7 +42,7 @@ StatusListItem {
|
||||||
id: addButton
|
id: addButton
|
||||||
icon.name: "add"
|
icon.name: "add"
|
||||||
icon.width: 20
|
icon.width: 20
|
||||||
visible: statusChatListCategoryItem.showActionButtons &&
|
visible: statusChatListCategoryItem.showAddButton &&
|
||||||
(statusChatListCategoryItem.highlighted ||
|
(statusChatListCategoryItem.highlighted ||
|
||||||
statusChatListCategoryItem.sensor.containsMouse)
|
statusChatListCategoryItem.sensor.containsMouse)
|
||||||
onClicked: statusChatListCategoryItem.addButtonClicked(mouse)
|
onClicked: statusChatListCategoryItem.addButtonClicked(mouse)
|
||||||
|
@ -50,7 +52,7 @@ StatusListItem {
|
||||||
id: menuButton
|
id: menuButton
|
||||||
icon.name: "more"
|
icon.name: "more"
|
||||||
icon.width: 21
|
icon.width: 21
|
||||||
visible: statusChatListCategoryItem.showActionButtons &&
|
visible: statusChatListCategoryItem.showMenuButton &&
|
||||||
(statusChatListCategoryItem.highlighted ||
|
(statusChatListCategoryItem.highlighted ||
|
||||||
statusChatListCategoryItem.sensor.containsMouse)
|
statusChatListCategoryItem.sensor.containsMouse)
|
||||||
onClicked: statusChatListCategoryItem.menuButtonClicked(mouse)
|
onClicked: statusChatListCategoryItem.menuButtonClicked(mouse)
|
||||||
|
|
Loading…
Reference in New Issue