[Plasmoid]Make device menu use PC ContextMenu
Summary: Change the three dotted menu to use PlasmaComponents ContextMenu. This prevents menu from staying open on other system tray's applets. Wayland still has that issue, happens in other menus too. BUG: 415142 And change menu icon into a hamburger menu. Test Plan: Before: Open the menu, and then open an other applet. Menu will stay open on the left. Even if change windows and open the system tray, will still be there. After: Use X11. By clicking, for example volume applet, menu will minimize. Will need to click again to open the applet.
This commit is contained in:
parent
9d6db94f7d
commit
875cf16a40
1 changed files with 12 additions and 13 deletions
|
@ -88,18 +88,17 @@ PlasmaComponents.ListItem
|
||||||
|
|
||||||
PlasmaComponents3.ToolButton {
|
PlasmaComponents3.ToolButton {
|
||||||
id: overflowMenu
|
id: overflowMenu
|
||||||
Layout.alignment: Qt.AlignRight
|
icon.name: "application-menu"
|
||||||
icon.name: "overflow-menu"
|
|
||||||
Layout.maximumHeight: deviceName.height * 2
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
menu.popup(overflowMenu, 0, overflowMenu.height)
|
menu.open(overflowMenu, overflowMenu.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
PlasmaComponents.ContextMenu {
|
||||||
id: menu
|
id: menu
|
||||||
|
|
||||||
//Share
|
//Share
|
||||||
MenuItem
|
PlasmaComponents.MenuItem
|
||||||
{
|
{
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: fileDialog
|
id: fileDialog
|
||||||
|
@ -109,7 +108,7 @@ PlasmaComponents.ListItem
|
||||||
}
|
}
|
||||||
|
|
||||||
id: shareFile
|
id: shareFile
|
||||||
icon.name: "document-share"
|
icon: "document-share"
|
||||||
visible: share.available
|
visible: share.available
|
||||||
text: i18n("Share file")
|
text: i18n("Share file")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -121,7 +120,7 @@ PlasmaComponents.ListItem
|
||||||
}
|
}
|
||||||
|
|
||||||
//Find my phone
|
//Find my phone
|
||||||
MenuItem
|
PlasmaComponents.MenuItem
|
||||||
{
|
{
|
||||||
FindMyPhone {
|
FindMyPhone {
|
||||||
id: findmyphone
|
id: findmyphone
|
||||||
|
@ -129,7 +128,7 @@ PlasmaComponents.ListItem
|
||||||
}
|
}
|
||||||
|
|
||||||
id: ring
|
id: ring
|
||||||
icon.name: "irc-voice"
|
icon: "irc-voice"
|
||||||
visible: findmyphone.available
|
visible: findmyphone.available
|
||||||
text: i18n("Ring my phone")
|
text: i18n("Ring my phone")
|
||||||
|
|
||||||
|
@ -139,7 +138,7 @@ PlasmaComponents.ListItem
|
||||||
}
|
}
|
||||||
|
|
||||||
//SFTP
|
//SFTP
|
||||||
MenuItem
|
PlasmaComponents.MenuItem
|
||||||
{
|
{
|
||||||
Sftp {
|
Sftp {
|
||||||
id: sftp
|
id: sftp
|
||||||
|
@ -147,7 +146,7 @@ PlasmaComponents.ListItem
|
||||||
}
|
}
|
||||||
|
|
||||||
id: browse
|
id: browse
|
||||||
icon.name: "document-open-folder"
|
icon: "document-open-folder"
|
||||||
visible: sftp.available
|
visible: sftp.available
|
||||||
text: i18n("Browse this device")
|
text: i18n("Browse this device")
|
||||||
|
|
||||||
|
@ -157,14 +156,14 @@ PlasmaComponents.ListItem
|
||||||
}
|
}
|
||||||
|
|
||||||
//SMS
|
//SMS
|
||||||
MenuItem
|
PlasmaComponents.MenuItem
|
||||||
{
|
{
|
||||||
SMS {
|
SMS {
|
||||||
id: sms
|
id: sms
|
||||||
device: root.device
|
device: root.device
|
||||||
}
|
}
|
||||||
|
|
||||||
icon.name: "message-new"
|
icon: "message-new"
|
||||||
visible: sms.available
|
visible: sms.available
|
||||||
text: i18n("SMS Messages")
|
text: i18n("SMS Messages")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue