Compare commits
4 commits
19eedf9c0e
...
c5067c4e7f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5067c4e7f | ||
|
|
e1241b33d2 | ||
|
|
5a4d5b3e27 | ||
|
|
6c91fc031c |
7 changed files with 295 additions and 300 deletions
|
|
@ -205,7 +205,7 @@ M.BarSection {
|
|||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "\uF185"
|
||||
color: M.Theme.base0A
|
||||
color: root.accentColor
|
||||
font.pixelSize: M.Theme.fontSize + 2
|
||||
font.family: M.Theme.iconFontFamily
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ M.BarSection {
|
|||
Rectangle {
|
||||
width: parent.width * root.percent / 100
|
||||
height: parent.height
|
||||
color: M.Theme.base0A
|
||||
color: root.accentColor
|
||||
radius: 3
|
||||
|
||||
Behavior on width {
|
||||
|
|
|
|||
|
|
@ -107,8 +107,10 @@ PanelWindow {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: M.Theme.groupSpacing
|
||||
|
||||
M.Privacy {}
|
||||
M.BarGroup {
|
||||
M.Privacy {
|
||||
visible: M.Modules.privacy.enable
|
||||
}
|
||||
M.Clock {
|
||||
visible: M.Modules.clock.enable
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@ QtObject {
|
|||
warning: 25,
|
||||
critical: 15
|
||||
})
|
||||
property var privacy: ({
|
||||
enable: true
|
||||
})
|
||||
property var screenCorners: ({
|
||||
enable: true
|
||||
})
|
||||
property var power: ({
|
||||
enable: true
|
||||
})
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ M.BarSection {
|
|||
width: (parent.width - 15 * parent.spacing) / 16
|
||||
height: parent.height * (root._cavaBars[index] ?? 0)
|
||||
anchors.bottom: parent.bottom
|
||||
color: M.Theme.base0E
|
||||
color: root.accentColor
|
||||
radius: 1
|
||||
|
||||
Behavior on height {
|
||||
|
|
@ -382,7 +382,7 @@ M.BarSection {
|
|||
Rectangle {
|
||||
width: parent.width * Math.min(1, Math.max(0, parent.parent.frac))
|
||||
height: parent.height
|
||||
color: M.Theme.base0E
|
||||
color: root.accentColor
|
||||
radius: 2
|
||||
}
|
||||
}
|
||||
|
|
@ -413,7 +413,7 @@ M.BarSection {
|
|||
|
||||
Text {
|
||||
text: root.playing ? "\uF04C" : "\uF04B"
|
||||
color: M.Theme.base0E
|
||||
color: root.accentColor
|
||||
font.pixelSize: M.Theme.fontSize + 8
|
||||
font.family: M.Theme.iconFontFamily
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -459,7 +459,7 @@ M.BarSection {
|
|||
height: 18
|
||||
radius: 9
|
||||
color: _active ? M.Theme.base02 : (pArea.containsMouse ? M.Theme.base02 : "transparent")
|
||||
border.color: _active ? M.Theme.base0E : M.Theme.base03
|
||||
border.color: _active ? root.accentColor : M.Theme.base03
|
||||
border.width: _active ? 1 : 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ M.BarSection {
|
|||
id: _pLabel
|
||||
anchors.centerIn: parent
|
||||
text: modelData.identity ?? "Player"
|
||||
color: _active ? M.Theme.base0E : M.Theme.base04
|
||||
color: _active ? root.accentColor : M.Theme.base04
|
||||
font.pixelSize: M.Theme.fontSize - 2
|
||||
font.family: M.Theme.fontFamily
|
||||
font.bold: _active
|
||||
|
|
|
|||
|
|
@ -64,24 +64,32 @@ M.PopupPanel {
|
|||
}
|
||||
}
|
||||
|
||||
property var _delegates: []
|
||||
|
||||
property var _pendingDismissIds: []
|
||||
|
||||
function _cascadeDismiss() {
|
||||
const dels = _delegates.filter(d => d && d.modelData && !d.modelData.closed);
|
||||
if (dels.length === 0)
|
||||
const list = M.NotifService.list;
|
||||
if (list.length === 0)
|
||||
return;
|
||||
|
||||
_pendingDismissIds = dels.map(d => d.modelData.id);
|
||||
_pendingDismissIds = list.map(n => n.id);
|
||||
|
||||
for (let i = 0; i < dels.length; i++) {
|
||||
const d = dels[i];
|
||||
const isLast = (i === dels.length - 1);
|
||||
const visibles = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const d = notifList.itemAtIndex(i);
|
||||
if (d && d.modelData?.state !== "dismissing")
|
||||
visibles.push(d);
|
||||
}
|
||||
|
||||
if (visibles.length === 0) {
|
||||
_finishCascade();
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < visibles.length; i++) {
|
||||
_cascadeTimer.createObject(menuWindow, {
|
||||
_target: d,
|
||||
_target: visibles[i],
|
||||
_delay: i * 60,
|
||||
_isLast: isLast
|
||||
_isLast: i === visibles.length - 1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -132,25 +140,12 @@ M.PopupPanel {
|
|||
}
|
||||
|
||||
// Notification list (scrollable)
|
||||
Item {
|
||||
ListView {
|
||||
id: notifList
|
||||
width: menuWindow.panelWidth
|
||||
height: Math.min(notifFlick.contentHeight, _maxHeight)
|
||||
readonly property real _itemHeight: 60
|
||||
readonly property real _maxHeight: _itemHeight * (M.Modules.notifications.maxVisible || 10)
|
||||
|
||||
Flickable {
|
||||
id: notifFlick
|
||||
anchors.fill: parent
|
||||
contentWidth: width
|
||||
contentHeight: notifCol.implicitHeight
|
||||
height: Math.min(contentHeight, 60 * (M.Modules.notifications.maxVisible || 10))
|
||||
clip: true
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
Column {
|
||||
id: notifCol
|
||||
width: parent.width
|
||||
|
||||
Repeater {
|
||||
model: M.NotifService.list
|
||||
|
||||
delegate: Item {
|
||||
|
|
@ -182,15 +177,7 @@ M.PopupPanel {
|
|||
_dismissAnim.start();
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
menuWindow._delegates.push(notifItem);
|
||||
fadeIn.start();
|
||||
}
|
||||
Component.onDestruction: {
|
||||
const idx = menuWindow._delegates.indexOf(notifItem);
|
||||
if (idx >= 0)
|
||||
menuWindow._delegates.splice(idx, 1);
|
||||
}
|
||||
Component.onCompleted: fadeIn.start()
|
||||
|
||||
NumberAnimation {
|
||||
id: fadeIn
|
||||
|
|
@ -419,10 +406,7 @@ M.PopupPanel {
|
|||
onClicked: _dismissAnim.start()
|
||||
}
|
||||
}
|
||||
} // Repeater
|
||||
} // Column
|
||||
} // Flickable
|
||||
} // Item
|
||||
}
|
||||
|
||||
// Empty state
|
||||
Text {
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ M.BarSection {
|
|||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: modelData.description || modelData.name || "Unknown"
|
||||
color: parent._active ? M.Theme.base0E : M.Theme.base05
|
||||
color: parent._active ? root.accentColor : M.Theme.base05
|
||||
font.pixelSize: M.Theme.fontSize
|
||||
font.family: M.Theme.fontFamily
|
||||
font.bold: parent._active
|
||||
|
|
@ -472,7 +472,7 @@ M.BarSection {
|
|||
Rectangle {
|
||||
width: parent.width * Math.min(1, Math.max(0, streamEntry._vol))
|
||||
height: parent.height
|
||||
color: streamEntry._muted ? M.Theme.base04 : M.Theme.base0E
|
||||
color: streamEntry._muted ? M.Theme.base04 : root.accentColor
|
||||
radius: 2
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,9 +40,12 @@ ShellRoot {
|
|||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
active: Modules.screenCorners.enable
|
||||
ScreenCorners {
|
||||
screen: scope.modelData
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue