Merge branch 'main' into module/wifi
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 16s
Python / lint-format (pull_request) Successful in 32s
Python / test (pull_request) Successful in 38s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m49s
C++ / build (pull_request) Successful in 3m5s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 16s
Python / lint-format (pull_request) Successful in 32s
Python / test (pull_request) Successful in 38s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m49s
C++ / build (pull_request) Successful in 3m5s
This commit is contained in:
+2
-15
@@ -47,7 +47,7 @@ RowLayout {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!popouts.currentName.startsWith("traymenu"))
|
||||
if (!popouts.currentName.startsWith("traymenu") || Config.bar.tray.showOnHover)
|
||||
popouts.hasCurrent = false;
|
||||
}
|
||||
|
||||
@@ -56,19 +56,7 @@ RowLayout {
|
||||
const item = ch.item;
|
||||
const itemWidth = item.implicitWidth;
|
||||
|
||||
if (id === "audio" && Config.bar.popouts.audio) {
|
||||
popouts.currentName = "audio";
|
||||
popouts.currentCenter = Qt.binding(() => item.mapToItem(root, itemWidth / 2, 0).x);
|
||||
popouts.hasCurrent = true;
|
||||
} else if (id === "network" && Config.bar.popouts.network) {
|
||||
popouts.currentName = "network";
|
||||
popouts.currentCenter = Qt.binding(() => item.mapToItem(root, itemWidth / 2, 0).x);
|
||||
popouts.hasCurrent = true;
|
||||
} else if (id === "upower" && Config.bar.popouts.upower) {
|
||||
popouts.currentName = "upower";
|
||||
popouts.currentCenter = Qt.binding(() => item.mapToItem(root, itemWidth / 2, 0).x);
|
||||
popouts.hasCurrent = true;
|
||||
} else if (id === "updates") {
|
||||
if (id === "updates") {
|
||||
popouts.currentName = "updates";
|
||||
popouts.currentCenter = Qt.binding(() => item.mapToItem(root, itemWidth / 2, 0).x);
|
||||
popouts.hasCurrent = true;
|
||||
@@ -80,7 +68,6 @@ RowLayout {
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
// model: Config.bar.entries.filted(n => n.index > 50).sort(n => n.index)
|
||||
model: Config.bar.entries
|
||||
|
||||
DelegateChooser {
|
||||
|
||||
@@ -133,7 +133,7 @@ CustomRect {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
easing: Appearance.anim.curves.standardAccel
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
property: "scale"
|
||||
target: listOrControls
|
||||
to: 0.7
|
||||
@@ -141,7 +141,7 @@ CustomRect {
|
||||
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
easing: Appearance.anim.curves.standardAccel
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
property: "opacity"
|
||||
target: listOrControls
|
||||
to: 0
|
||||
@@ -166,7 +166,7 @@ CustomRect {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
easing: Appearance.anim.curves.standardDecel
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
property: "scale"
|
||||
target: listOrControls
|
||||
to: 1
|
||||
@@ -174,7 +174,7 @@ CustomRect {
|
||||
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
easing: Appearance.anim.curves.standardDecel
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
property: "opacity"
|
||||
target: listOrControls
|
||||
to: 1
|
||||
@@ -217,14 +217,14 @@ CustomRect {
|
||||
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.large
|
||||
easing: Appearance.anim.curves.emphasizedAccel
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasizedAccel
|
||||
from: 1
|
||||
to: 0
|
||||
}
|
||||
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.extraLarge
|
||||
easing: Appearance.anim.curves.emphasizedDecel
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasizedDecel
|
||||
from: 0
|
||||
to: 1
|
||||
}
|
||||
|
||||
+45
-37
@@ -1,8 +1,8 @@
|
||||
import Quickshell
|
||||
import Quickshell.Services.Polkit
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Widgets
|
||||
import ZShell.Components
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
@@ -243,17 +243,16 @@ Scope {
|
||||
Layout.preferredWidth: contentRow.implicitWidth
|
||||
spacing: 8
|
||||
|
||||
CustomButton {
|
||||
IconTextButton {
|
||||
id: detailsButton
|
||||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.preferredHeight: 40
|
||||
Layout.preferredWidth: 92
|
||||
bgColor: DynamicColors.palette.m3surfaceContainer
|
||||
enabled: true
|
||||
radius: Appearance.rounding.full
|
||||
icon: "info"
|
||||
inactiveColor: DynamicColors.palette.m3surfaceContainer
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurface
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
text: "Details"
|
||||
textColor: DynamicColors.palette.m3onSurface
|
||||
|
||||
onClicked: {
|
||||
panelWindow.detailsOpen = !panelWindow.detailsOpen;
|
||||
@@ -266,41 +265,50 @@ Scope {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
id: okButton
|
||||
|
||||
ButtonRow {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.preferredHeight: 40
|
||||
Layout.preferredWidth: 76
|
||||
bgColor: DynamicColors.palette.m3primary
|
||||
enabled: passInput.text.length > 0 || !!polkitAgent.flow?.isResponseRequired
|
||||
radius: Appearance.rounding.full
|
||||
text: "OK"
|
||||
textColor: DynamicColors.palette.m3onPrimary
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
onClicked: {
|
||||
polkitAgent.flow.submit(passInput.text);
|
||||
passInput.text = "";
|
||||
passInput.forceActiveFocus();
|
||||
IconTextButton {
|
||||
id: okButton
|
||||
|
||||
enabled: passInput.text.length > 0 || !!polkitAgent.flow?.isResponseRequired
|
||||
horizontalPadding: Appearance.padding.large
|
||||
icon: "check"
|
||||
inactiveColor: DynamicColors.palette.m3primary
|
||||
inactiveOnColor: DynamicColors.palette.m3onPrimary
|
||||
isRound: true
|
||||
isToggle: false
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
text: "OK"
|
||||
|
||||
onClicked: {
|
||||
polkitAgent.flow.submit(passInput.text);
|
||||
passInput.text = "";
|
||||
passInput.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
id: cancelButton
|
||||
IconTextButton {
|
||||
id: cancelButton
|
||||
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.preferredHeight: 40
|
||||
Layout.preferredWidth: 76
|
||||
bgColor: DynamicColors.palette.m3surfaceContainer
|
||||
enabled: passInput.text.length > 0 || !!polkitAgent.flow?.isResponseRequired
|
||||
radius: Appearance.rounding.full
|
||||
text: "Cancel"
|
||||
textColor: DynamicColors.palette.m3onSurface
|
||||
enabled: passInput.text.length > 0 || !!polkitAgent.flow?.isResponseRequired
|
||||
horizontalPadding: Appearance.padding.large
|
||||
icon: "close"
|
||||
inactiveColor: DynamicColors.palette.m3surfaceContainer
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurface
|
||||
isRound: true
|
||||
isToggle: false
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
text: "Cancel"
|
||||
|
||||
onClicked: {
|
||||
root.shouldShow = false;
|
||||
polkitAgent.flow.cancelAuthenticationRequest();
|
||||
passInput.text = "";
|
||||
onClicked: {
|
||||
root.shouldShow = false;
|
||||
polkitAgent.flow.cancelAuthenticationRequest();
|
||||
passInput.text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ PageBase {
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 12
|
||||
last: true
|
||||
settingAnchor: "bar-tray-iconsize"
|
||||
stepSize: 1
|
||||
text: qsTr("Icon size")
|
||||
@@ -28,5 +27,24 @@ PageBase {
|
||||
|
||||
onMoved: value => Config.bar.tray.trayIconSize = value
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showOnHover
|
||||
settingAnchor: "bar-tray-show-popout-on-hover"
|
||||
subtext: Config.bar.tray.showOnHover ? qsTr("Will show context menu on hover") : qsTr("Will show context menu on right-click")
|
||||
text: qsTr("Show popout on hover")
|
||||
|
||||
onToggled: Config.bar.tray.showOnHover = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.recolorIcons
|
||||
last: true
|
||||
settingAnchor: "bar-tray-recolor-icons"
|
||||
subtext: qsTr("Recolors icons to fit current scheme")
|
||||
text: qsTr("Recolor icons")
|
||||
|
||||
onToggled: Config.bar.tray.recolorIcons = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,8 @@ Item {
|
||||
CustomRect {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 3
|
||||
color: icon.layer.enabled && root.current ? DynamicColors.palette.m3primary : "transparent"
|
||||
color: icon.layer.enabled && enabled && root.current ? DynamicColors.palette.m3primary : "transparent"
|
||||
enabled: !Config.bar.tray.showOnHover
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
StateLayer {
|
||||
@@ -57,7 +58,7 @@ Item {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
root.item.activate();
|
||||
console.log(icon.source + "\n" + root.item.id);
|
||||
} else if (mouse.button === Qt.RightButton && Config.bar.popouts.tray) {
|
||||
} else if (mouse.button === Qt.RightButton && Config.bar.popouts.tray && !Config.bar.tray.showOnHover) {
|
||||
root.popouts.currentName = `traymenu${root.ind}`;
|
||||
root.popouts.currentCenter = Qt.binding(() => root.mapToItem(root.loader, root.implicitWidth / 2, 0).x);
|
||||
root.popouts.hasCurrent = true;
|
||||
@@ -76,9 +77,9 @@ Item {
|
||||
|
||||
anchors.centerIn: parent
|
||||
antialiasing: true
|
||||
color: root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
color: root.current && !Config.bar.tray.showOnHover ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
implicitSize: Config.bar.tray.trayIconSize * root.dpr
|
||||
layer.enabled: Config.general.color.smart || Config.general.color.scheduleDark
|
||||
layer.enabled: Config.bar.tray.recolorIcons
|
||||
scale: 1 / root.dpr
|
||||
source: root.resolveIcon(root.item.id, root.item.icon)
|
||||
}
|
||||
|
||||
@@ -66,12 +66,12 @@ RowLayout {
|
||||
}
|
||||
|
||||
let trayPos = mapToItem(sysTray, localX, localY);
|
||||
if (sysTray.contains(Qt.point(trayPos.x, trayPos.y))) {
|
||||
if (Config.bar.tray.showOnHover && sysTray.contains(Qt.point(trayPos.x, trayPos.y))) {
|
||||
let trayRowPos = sysTray.mapToItem(sysRow, trayPos.x, trayPos.y);
|
||||
let child = sysRow.childAt(trayRowPos.x, trayRowPos.y);
|
||||
if (child && child.hasOwnProperty("popoutId")) {
|
||||
if (child && child.hasOwnProperty("ind")) {
|
||||
return {
|
||||
id: child.popoutId,
|
||||
id: `traymenu${child.ind}`,
|
||||
item: child
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user