quickshell fixes
This commit is contained in:
1 parent
d2975650fa
commit
32b43bdbb3
68 files changed
+1461
-1047
No files matched your search
@@ -66,10 +66,12 @@ PanelWindow {
|
||||
|
||||
readonly property color tone: {
|
||||
switch (root.kind) {
|
||||
case "mic": return Audio.micMuted ? Theme.accent : Theme.blue;
|
||||
// Turning the screen up is not a warning. White, like volume.
|
||||
case "brightness": return Theme.text;
|
||||
default: return Audio.muted ? Theme.accent : Theme.primary;
|
||||
// One tone for every level: the accent while the channel is live, the
|
||||
// off grey while it is muted. Muted used to be the accent too, so a
|
||||
// silenced speaker flashed the same colour as a live one.
|
||||
case "mic": return Audio.micMuted ? Theme.treatmentOffText : Theme.accent;
|
||||
case "brightness": return Theme.accent;
|
||||
default: return Audio.muted ? Theme.treatmentOffText : Theme.accent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,15 +106,11 @@ PanelWindow {
|
||||
anchors.margins: 4
|
||||
fill: Theme.mantle
|
||||
fillOpacity: 0.97
|
||||
border: Theme.alpha(root.tone, 0.85)
|
||||
border: Theme.surfaceAlt
|
||||
borderWidth: Theme.stroke
|
||||
slash: true
|
||||
slashColor: root.tone
|
||||
slashWidth: 5
|
||||
halftone: true
|
||||
halftoneColor: root.tone
|
||||
halftoneOpacity: 0.08
|
||||
sheen: true
|
||||
lean: 0.09
|
||||
chop: 14
|
||||
padding: Theme.padM
|
||||
@@ -180,8 +178,6 @@ PanelWindow {
|
||||
// widening readout only moves its own left edge.
|
||||
text: Math.round(root.level * 100) + "%"
|
||||
pixelSize: Theme.fsBody
|
||||
split: 1
|
||||
splitOpacity: 0.5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import "root:/config"
|
||||
import "root:/components"
|
||||
import "root:/services"
|
||||
|
||||
// Full-screen power menu. Crimson stripes sweep in behind a stack of leaning
|
||||
// Full-screen power menu. An accent wedge and stripes sweep in behind a stack of leaning
|
||||
// buttons; Escape or a click on the backdrop dismisses it.
|
||||
PanelWindow {
|
||||
id: root
|
||||
@@ -67,7 +67,7 @@ PanelWindow {
|
||||
Rectangle {
|
||||
id: backdrop
|
||||
anchors.fill: parent
|
||||
color: Theme.alpha(Theme.base, 0.82)
|
||||
color: Theme.alpha(Theme.base, 0.9)
|
||||
opacity: 0
|
||||
|
||||
TapHandler {
|
||||
|
||||
@@ -13,9 +13,9 @@ PanelWindow {
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
|
||||
// Only the primary bar screen shows toasts, to avoid duplicates.
|
||||
readonly property bool primaryScreen: Quickshell.screens.length === 0
|
||||
|| Quickshell.screens[0] === modelData
|
||||
// A toast window exists on every screen, but each notification lands only
|
||||
// on the monitor that had focus when it arrived. Latched per toast rather
|
||||
// than live, so a card does not hop screens while it is being read.
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
WlrLayershell.namespace: "takemi-toasts"
|
||||
@@ -31,7 +31,7 @@ PanelWindow {
|
||||
implicitHeight: Math.max(1, stack.implicitHeight)
|
||||
color: "transparent"
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
visible: primaryScreen && stack.children.length > 0
|
||||
visible: root.live.length > 0
|
||||
|
||||
// Toasts currently on screen, newest first.
|
||||
property list<Notification> live: []
|
||||
@@ -39,9 +39,8 @@ PanelWindow {
|
||||
|
||||
Connections {
|
||||
target: Notifs
|
||||
enabled: root.primaryScreen
|
||||
|
||||
function onPopupRequested(notif) {
|
||||
if (Actions.focusedScreenName() !== root.modelData.name) return;
|
||||
root.live = [notif, ...root.live].slice(0, root.maxLive);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user