properly handle disabling popouts
This commit is contained in:
@@ -55,7 +55,7 @@ Item {
|
|||||||
if (mouse.button === Qt.LeftButton) {
|
if (mouse.button === Qt.LeftButton) {
|
||||||
root.item.activate();
|
root.item.activate();
|
||||||
console.log(icon.source + "\n" + root.item.id);
|
console.log(icon.source + "\n" + root.item.id);
|
||||||
} else if (mouse.button === Qt.RightButton) {
|
} else if (mouse.button === Qt.RightButton && Config.barConfig.popouts.tray) {
|
||||||
root.popouts.currentName = `traymenu${root.ind}`;
|
root.popouts.currentName = `traymenu${root.ind}`;
|
||||||
root.popouts.currentCenter = Qt.binding(() => root.mapToItem(root.loader, root.implicitWidth / 2, 0).x);
|
root.popouts.currentCenter = Qt.binding(() => root.mapToItem(root.loader, root.implicitWidth / 2, 0).x);
|
||||||
root.popouts.hasCurrent = true;
|
root.popouts.hasCurrent = true;
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ RowLayout {
|
|||||||
let modRowPos = sysTrayMod.mapToItem(sysModRow, modPos.x, modPos.y);
|
let modRowPos = sysTrayMod.mapToItem(sysModRow, modPos.x, modPos.y);
|
||||||
let child = sysModRow.childAt(modRowPos.x, modRowPos.y);
|
let child = sysModRow.childAt(modRowPos.x, modRowPos.y);
|
||||||
if (child) {
|
if (child) {
|
||||||
if (child.objectName === "audioWidget")
|
if (child.objectName === "audioWidget" && Config.barConfig.popouts.audio)
|
||||||
return {
|
return {
|
||||||
id: "audio",
|
id: "audio",
|
||||||
item: child
|
item: child
|
||||||
};
|
};
|
||||||
if (child.objectName === "upowerWidget")
|
if (child.objectName === "upowerWidget" && Config.barConfig.popouts.upower)
|
||||||
return {
|
return {
|
||||||
id: "upower",
|
id: "upower",
|
||||||
item: child
|
item: child
|
||||||
|
|||||||
Reference in New Issue
Block a user