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