Compare commits

...

2 commits

Author SHA1 Message Date
Damocles
0c89b570ac fix dismiss-all cascade, fix notification timeout type mismatch 2026-04-13 15:49:07 +02:00
Damocles
61b49a6aa8 edge bar groups follow screen corner curvature 2026-04-13 15:47:00 +02:00
4 changed files with 35 additions and 14 deletions

View file

@ -127,6 +127,7 @@ PanelWindow {
spacing: M.Theme.barSpacing spacing: M.Theme.barSpacing
M.BarGroup { M.BarGroup {
leftEdge: true
M.Workspaces { M.Workspaces {
bar: bar bar: bar
visible: M.Modules.workspaces.enable visible: M.Modules.workspaces.enable
@ -214,6 +215,7 @@ PanelWindow {
// Power // Power
M.BarGroup { M.BarGroup {
rightEdge: true
M.Battery {} M.Battery {}
M.Power { M.Power {
bar: bar bar: bar

View file

@ -17,6 +17,13 @@ Item {
return Math.max(0, Math.min(1, gx / scr.width)); return Math.max(0, Math.min(1, gx / scr.width));
} }
property color borderColor: Qt.rgba(M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac, M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac, M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.base0C.b) * _posFrac, 1) property color borderColor: Qt.rgba(M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac, M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac, M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.base0C.b) * _posFrac, 1)
property bool leftEdge: false
property bool rightEdge: false
readonly property real _tlr: leftEdge ? M.Theme.screenRadius : M.Theme.radius
readonly property real _trr: rightEdge ? M.Theme.screenRadius : M.Theme.radius
readonly property real _blr: M.Theme.radius
readonly property real _brr: M.Theme.radius
visible: row.visibleChildren.length > 0 visible: row.visibleChildren.length > 0
@ -32,7 +39,10 @@ Item {
color: "transparent" color: "transparent"
border.color: root.borderColor border.color: root.borderColor
border.width: 1 border.width: 1
radius: M.Theme.radius topLeftRadius: root._tlr
topRightRadius: root._trr
bottomLeftRadius: root._blr
bottomRightRadius: root._brr
visible: false visible: false
} }
@ -49,14 +59,20 @@ Item {
// Solid background // Solid background
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: M.Theme.radius topLeftRadius: root._tlr
topRightRadius: root._trr
bottomLeftRadius: root._blr
bottomRightRadius: root._brr
color: M.Theme.base01 color: M.Theme.base01
} }
// Accent gradient overlay // Accent gradient overlay
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: M.Theme.radius topLeftRadius: root._tlr
topRightRadius: root._trr
bottomLeftRadius: root._blr
bottomRightRadius: root._brr
gradient: Gradient { gradient: Gradient {
GradientStop { GradientStop {
position: 0 position: 0
@ -75,7 +91,10 @@ Item {
color: "transparent" color: "transparent"
border.color: root.borderColor border.color: root.borderColor
border.width: 1 border.width: 1
radius: M.Theme.radius topLeftRadius: root._tlr
topRightRadius: root._trr
bottomLeftRadius: root._blr
bottomRightRadius: root._brr
} }
Row { Row {

View file

@ -69,13 +69,9 @@ M.PopupPanel {
function _cascadeDismiss() { function _cascadeDismiss() {
const dels = _delegates.filter(d => d && d.modelData && !d.modelData.closed); const dels = _delegates.filter(d => d && d.modelData && !d.modelData.closed);
for (let i = 0; i < dels.length; i++) { for (let i = 0; i < dels.length; i++) {
const d = dels[i];
const delay = i * 60;
Qt.callLater(() => {
_cascadeTimer.createObject(menuWindow, { _cascadeTimer.createObject(menuWindow, {
_target: d, _target: dels[i],
_delay: delay _delay: i * 60
});
}); });
} }
} }
@ -87,8 +83,8 @@ M.PopupPanel {
interval: _delay interval: _delay
running: true running: true
onTriggered: { onTriggered: {
if (_target && _target._dismissAnim) if (_target && _target.dismiss)
_target._dismissAnim.start(); _target.dismiss();
destroy(); destroy();
} }
} }
@ -119,6 +115,10 @@ M.PopupPanel {
readonly property real _targetHeight: notifContent.height + 12 readonly property real _targetHeight: notifContent.height + 12
property real _heightScale: 1 property real _heightScale: 1
function dismiss() {
_dismissAnim.start();
}
Component.onCompleted: { Component.onCompleted: {
menuWindow._delegates.push(notifItem); menuWindow._delegates.push(notifItem);
fadeIn.start(); fadeIn.start();

View file

@ -107,7 +107,7 @@ QtObject {
property Component _expireTimer: Component { property Component _expireTimer: Component {
Timer { Timer {
property string _notifId property var _notifId
running: true running: true
onTriggered: { onTriggered: {
root.dismissPopup(_notifId); root.dismissPopup(_notifId);