Compare commits
2 commits
75a94628ad
...
50cbbf6665
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50cbbf6665 | ||
|
|
c59a2c622d |
7 changed files with 20 additions and 16 deletions
|
|
@ -17,7 +17,7 @@ Text {
|
|||
onHoveredChanged: {
|
||||
if (hovered && root.tooltip !== "") {
|
||||
M.FlyoutState.text = root.tooltip;
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x;
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.FlyoutState.screen = QsWindow.window?.screen ?? null;
|
||||
M.FlyoutState.visible = true;
|
||||
} else if (!hovered && root.tooltip !== "") {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Text {
|
|||
onHoveredChanged: {
|
||||
if (hovered && root.tooltip !== "") {
|
||||
M.FlyoutState.text = root.tooltip;
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x;
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.FlyoutState.screen = QsWindow.window?.screen ?? null;
|
||||
M.FlyoutState.visible = true;
|
||||
} else if (!hovered && root.tooltip !== "") {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Row {
|
|||
onHoveredChanged: {
|
||||
if (hovered && root.tooltip !== "") {
|
||||
M.FlyoutState.text = root.tooltip;
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x;
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.FlyoutState.screen = QsWindow.window?.screen ?? null;
|
||||
M.FlyoutState.visible = true;
|
||||
} else if (!hovered && root.tooltip !== "") {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,16 @@ PanelWindow {
|
|||
|
||||
readonly property bool _isNiri: Quickshell.env("NIRI_SOCKET") !== ""
|
||||
|
||||
Process {
|
||||
id: runner
|
||||
}
|
||||
|
||||
function _run(cmd) {
|
||||
runner.command = cmd;
|
||||
runner.running = true;
|
||||
menuClosed();
|
||||
}
|
||||
|
||||
visible: true
|
||||
color: "transparent"
|
||||
|
||||
|
|
@ -112,19 +122,11 @@ PanelWindow {
|
|||
font.family: M.Theme.fontFamily
|
||||
}
|
||||
|
||||
Process {
|
||||
id: runner
|
||||
command: entry.modelData.cmd
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: entryArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
runner.running = true;
|
||||
menuWindow.menuClosed();
|
||||
}
|
||||
onClicked: menuWindow._run(entry.modelData.cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@ M.BarIcon {
|
|||
onClicked: {
|
||||
const cycle = ["performance", "balanced", "power-saver"];
|
||||
const idx = cycle.indexOf(root.profile);
|
||||
setter.next = cycle[(idx + 1) % cycle.length];
|
||||
const next = cycle[(idx + 1) % cycle.length];
|
||||
root.profile = next;
|
||||
setter.next = next;
|
||||
setter.running = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ RowLayout {
|
|||
.filter(s => s).join("\n") || iconItem.modelData.title;
|
||||
if (hovered && tip) {
|
||||
M.FlyoutState.text = tip;
|
||||
M.FlyoutState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x;
|
||||
M.FlyoutState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.FlyoutState.screen = QsWindow.window?.screen ?? null;
|
||||
M.FlyoutState.visible = true;
|
||||
} else if (!hovered) {
|
||||
|
|
@ -69,7 +69,7 @@ RowLayout {
|
|||
sourceComponent: M.TrayMenu {
|
||||
handle: iconItem.modelData.menu
|
||||
screen: root.bar.screen
|
||||
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x
|
||||
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
||||
onMenuClosed: {
|
||||
menuLoader.active = false;
|
||||
root._activeMenu = null;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ M.BarIcon {
|
|||
active: false
|
||||
sourceComponent: M.PowerMenu {
|
||||
screen: root.bar.screen
|
||||
anchorX: root.mapToGlobal(root.width / 2, 0).x
|
||||
anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
||||
onMenuClosed: menuLoader.active = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue