fixed volume popup closing when changing a device + made notifications and volume fonts bolder

This commit is contained in:
SomeElse
2026-05-16 22:02:36 +00:00
parent 0c7b5188a8
commit c8343398f9
6 changed files with 88 additions and 52 deletions

View File

@@ -143,6 +143,7 @@ ModuleChip {
text: toastRoot.urgencyIcon(toastRoot.urgency)
color: toastRoot.urgencyColor(toastRoot.urgency)
font.pixelSize: 12
font.bold: true
Layout.alignment: Qt.AlignVCenter
renderType: Text.NativeRendering
}
@@ -162,6 +163,7 @@ ModuleChip {
text: toastRoot.timeStr
color: toastRoot.t.notifToastDim
font.pixelSize: 11
font.bold: true
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
@@ -177,6 +179,7 @@ ModuleChip {
text: "✕"
color: closeHover.hovered ? toastRoot.t.notifToastText : toastRoot.t.notifToastDim
font.pixelSize: 10
font.bold: true
renderType: Text.NativeRendering
}
HoverHandler { id: closeHover; cursorShape: Qt.PointingHandCursor }
@@ -200,6 +203,7 @@ ModuleChip {
text: toastRoot.body
color: toastRoot.t.notifToastDim
font.pixelSize: 12
font.bold: true
Layout.fillWidth: true
wrapMode: Text.WordWrap
maximumLineCount: 3
@@ -251,8 +255,8 @@ ModuleChip {
signal dismissed(int itemIndex)
height: histItemContent.implicitHeight + 24
radius: 12
height: histItemContent.implicitHeight + 16
radius: 10
clip: true
color: histItemHover.hovered ? histRoot.t.notifHistoryHover : "transparent"
Behavior on color { ColorAnimation { duration: 150; easing.type: Easing.OutCubic } }
@@ -271,48 +275,59 @@ ModuleChip {
Rectangle {
width: 3
height: Math.max(12, histRoot.height - 24)
height: Math.max(10, histRoot.height - 16)
radius: 1.5
anchors { left: parent.left; leftMargin: 10; verticalCenter: parent.verticalCenter }
anchors { left: parent.left; leftMargin: 8; verticalCenter: parent.verticalCenter }
color: histRoot.urgencyColor(histRoot.urgency)
}
Rectangle {
anchors { right: parent.right; top: parent.top; margins: 8 }
width: 22; height: 22; radius: 11
anchors { right: parent.right; top: parent.top; margins: 6 }
width: 18; height: 18; radius: 9
color: histCloseHover.hovered ? histRoot.t.notifHistoryHover : "transparent"
opacity: histItemHover.hovered ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 150 } }
Behavior on color { ColorAnimation { duration: 150 } }
Text { anchors.centerIn: parent; text: "✕"; color: histRoot.t.notifToastText; font.pixelSize: 10; renderType: Text.NativeRendering }
Text { anchors.centerIn: parent; text: "✕"; color: histRoot.t.notifToastText; font.pixelSize: 10; font.bold: true; renderType: Text.NativeRendering }
HoverHandler { id: histCloseHover; cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: dismissAnim.start() }
}
Text {
anchors { right: parent.right; rightMargin: 6; top: parent.top; topMargin: 8 }
text: histRoot.timeStr
color: histRoot.t.notifToastDim
font.pixelSize: 10
font.bold: true
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
opacity: histItemHover.hovered ? 0 : 1
Behavior on opacity { NumberAnimation { duration: 150 } }
}
ColumnLayout {
id: histItemContent
anchors { left: parent.left; right: parent.right; top: parent.top; leftMargin: 24; rightMargin: 36; topMargin: 12 }
spacing: 4
anchors { left: parent.left; right: parent.right; top: parent.top; leftMargin: 20; rightMargin: 40; topMargin: 8 }
spacing: 2
RowLayout {
Layout.fillWidth: true; spacing: 5
Text { text: histRoot.urgencyIcon(histRoot.urgency); color: histRoot.urgencyColor(histRoot.urgency); font.pixelSize: 11; Layout.alignment: Qt.AlignVCenter; renderType: Text.NativeRendering }
Text { text: histRoot.urgencyIcon(histRoot.urgency); color: histRoot.urgencyColor(histRoot.urgency); font.pixelSize: 10; font.bold: true; Layout.alignment: Qt.AlignVCenter; renderType: Text.NativeRendering }
Text {
text: histRoot.appName; color: histRoot.t.notifToastAppName; font.pixelSize: 12; font.bold: true
text: histRoot.appName; color: histRoot.t.notifToastAppName; font.pixelSize: 11; font.bold: true
font.capitalization: Font.AllUppercase; font.letterSpacing: 0.4; Layout.fillWidth: true; elide: Text.ElideRight; verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
Text { text: histRoot.timeStr; color: histRoot.t.notifToastDim; font.pixelSize: 11; verticalAlignment: Text.AlignVCenter; renderType: Text.NativeRendering }
}
Text {
text: histRoot.summary; color: histRoot.t.notifToastText; font.pixelSize: 13; font.bold: true
text: histRoot.summary; color: histRoot.t.notifToastText; font.pixelSize: 12; font.bold: true
Layout.fillWidth: true; elide: Text.ElideRight; textFormat: Text.PlainText; visible: histRoot.summary !== ""
renderType: Text.NativeRendering
}
Text {
text: histRoot.body; color: histRoot.t.notifToastDim; font.pixelSize: 12; Layout.fillWidth: true
text: histRoot.body; color: histRoot.t.notifToastDim; font.pixelSize: 11; font.bold: true; Layout.fillWidth: true
wrapMode: Text.WordWrap; maximumLineCount: 2; elide: Text.ElideRight; textFormat: Text.PlainText; visible: histRoot.body !== ""; lineHeight: 1.2
renderType: Text.NativeRendering
}
@@ -344,6 +359,7 @@ ModuleChip {
? t.notifDnd
: (root.unreadCount > 0 ? t.notifIconActive : t.notifIcon)
font.pixelSize: Cfg.Config.notifIconSize
font.bold: true
Behavior on color { ColorAnimation { duration: 150 } }
rotation: 0
@@ -586,7 +602,7 @@ ModuleChip {
anchors.topMargin: 20; anchors.leftMargin: 20; anchors.rightMargin: 20
spacing: 10
Text { text: "󰂚"; color: t.notifToastAppName; font.pixelSize: 18; Layout.alignment: Qt.AlignVCenter; renderType: Text.NativeRendering }
Text { text: "󰂚"; color: t.notifToastAppName; font.pixelSize: 18; font.bold: true; Layout.alignment: Qt.AlignVCenter; renderType: Text.NativeRendering }
Text {
text: "Notifications"; color: t.notifToastAppName; font.pixelSize: 15; font.bold: true
Layout.fillWidth: true; Layout.alignment: Qt.AlignVCenter; renderType: Text.NativeRendering
@@ -613,6 +629,7 @@ ModuleChip {
text: "󰂛"
color: root.doNotDisturb ? t.notifDnd : t.notifToastDim
font.pixelSize: 12
font.bold: true
anchors.verticalCenter: parent.verticalCenter
Behavior on color { ColorAnimation { duration: 150 } }
renderType: Text.NativeRendering
@@ -621,7 +638,7 @@ ModuleChip {
text: root.doNotDisturb ? "On" : "Off"
color: root.doNotDisturb ? t.notifDnd : t.notifToastDim
font.pixelSize: 11
font.bold: root.doNotDisturb
font.bold: true
anchors.verticalCenter: parent.verticalCenter
Behavior on color { ColorAnimation { duration: 150 } }
renderType: Text.NativeRendering
@@ -641,7 +658,7 @@ ModuleChip {
color: clearHover.hovered ? t.notifHistoryHover : "transparent"
Behavior on color { ColorAnimation { duration: 150 } }
Text { id: clearText; anchors.centerIn: parent; text: "Clear all"; color: t.notifToastDim; font.pixelSize: 11; renderType: Text.NativeRendering }
Text { id: clearText; anchors.centerIn: parent; text: "Clear all"; color: t.notifToastDim; font.pixelSize: 11; font.bold: true; renderType: Text.NativeRendering }
HoverHandler { id: clearHover; cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: clearAllAnim.start() }
}
@@ -693,8 +710,8 @@ ModuleChip {
width: histCol.width - 16; height: 90; visible: notifHistory.count === 0
ColumnLayout {
anchors.centerIn: parent; spacing: 8
Text { text: "󰂚"; color: t.notifHistoryEmpty; font.pixelSize: 30; Layout.alignment: Qt.AlignHCenter; renderType: Text.NativeRendering }
Text { text: "No notifications"; color: t.notifHistoryEmpty; font.pixelSize: 12; Layout.alignment: Qt.AlignHCenter; renderType: Text.NativeRendering }
Text { text: "󰂚"; color: t.notifHistoryEmpty; font.pixelSize: 30; font.bold: true; Layout.alignment: Qt.AlignHCenter; renderType: Text.NativeRendering }
Text { text: "No notifications"; color: t.notifHistoryEmpty; font.pixelSize: 12; font.bold: true; Layout.alignment: Qt.AlignHCenter; renderType: Text.NativeRendering }
}
}

View File

@@ -153,7 +153,9 @@ ModuleChip {
text: root.speakerGlyph(root.outputMuted, root.outputVolume)
color: root.outputMuted ? root.t.volIconMuted : root.t.volIcon
font.pixelSize: Cfg.Config.volumeIconSize
font.bold: true
Layout.alignment: Qt.AlignVCenter
renderType: Text.NativeRendering
}
}
@@ -190,7 +192,6 @@ ModuleChip {
color: root.t.volPopupBg
border.color: root.t.volPopupBorder
border.width: Cfg.Config.popupBorderWidth
layer.enabled: true
MouseArea { anchors.fill: parent; propagateComposedEvents: false }
@@ -254,8 +255,10 @@ ModuleChip {
text: "Volume Limits"
color: root.t.textDim
font.pixelSize: 10
font.bold: true
font.capitalization: Font.AllUppercase
Layout.fillWidth: true
renderType: Text.NativeRendering
}
LimitRow {
Layout.fillWidth: true
@@ -324,6 +327,8 @@ ModuleChip {
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: Cfg.Config.volumeIconSize + 4
horizontalAlignment: Text.AlignHCenter
renderType: Text.NativeRendering
font.bold: true
}
Text {
text: vs.label
@@ -331,6 +336,7 @@ ModuleChip {
font.pixelSize: 13
font.bold: true
Layout.fillWidth: true
renderType: Text.NativeRendering
}
Text {
text: vs.muted ? "muted" : vs.volume + "%"
@@ -339,6 +345,7 @@ ModuleChip {
font.bold: !vs.muted
horizontalAlignment: Text.AlignHCenter
Layout.preferredWidth: 44
renderType: Text.NativeRendering
}
Rectangle {
@@ -351,6 +358,8 @@ ModuleChip {
text: vs.muted ? "󰖁" : "󰕾"
color: vs.muted ? vs.accentColor : vs.dimColor
font.pixelSize: 11
font.bold: true
renderType: Text.NativeRendering
}
HoverHandler { id: muteHover; cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: vs.muteToggled() }
@@ -403,13 +412,15 @@ ModuleChip {
RowLayout {
Layout.fillWidth: true
spacing: 6
Text { text: "󰒓"; color: vs.dimColor; font.pixelSize: 11 }
Text { text: "󰒓"; color: vs.dimColor; font.pixelSize: 11; font.bold: true; renderType: Text.NativeRendering }
Text {
text: vs.deviceName
color: vs.textColor
font.pixelSize: 11
font.bold: true
elide: Text.ElideRight
Layout.fillWidth: true
renderType: Text.NativeRendering
}
Rectangle {
@@ -422,6 +433,8 @@ ModuleChip {
text: vs.pickerOpen ? "󰅃" : "󰅀"
color: vs.pickerOpen ? vs.accentColor : vs.dimColor
font.pixelSize: 10
font.bold: true
renderType: Text.NativeRendering
}
HoverHandler { id: chevHover; cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: vs.pickerOpen = !vs.pickerOpen }
@@ -470,8 +483,9 @@ ModuleChip {
Text {
text: modelData.description || modelData.nickName || modelData.name
color: isActive ? vs.accentColor : vs.textColor
font.pixelSize: 11; font.bold: isActive
font.pixelSize: 11; font.bold: true
elide: Text.ElideRight; Layout.fillWidth: true
renderType: Text.NativeRendering
}
}
HoverHandler { id: rowHover; cursorShape: Qt.PointingHandCursor }
@@ -499,12 +513,14 @@ ModuleChip {
signal decrement()
signal increment()
Text { text: lr.icon; color: lr.iconColor; font.pixelSize: 13 }
Text { text: lr.icon; color: lr.iconColor; font.pixelSize: 13; font.bold: true; renderType: Text.NativeRendering }
Text {
text: lr.labelText
color: lr.textColor
font.pixelSize: 11
font.bold: true
Layout.fillWidth: true
renderType: Text.NativeRendering
}
Rectangle {
@@ -516,6 +532,8 @@ ModuleChip {
anchors.centerIn: parent; text: ""
color: lr.value <= lr.minValue ? lr.dimColor : lr.textColor
font.pixelSize: 14
font.bold: true
renderType: Text.NativeRendering
}
HoverHandler { id: decHover; cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: { if (lr.value > lr.minValue) lr.decrement() } }
@@ -526,6 +544,7 @@ ModuleChip {
font.pixelSize: 12; font.bold: true
horizontalAlignment: Text.AlignHCenter
Layout.preferredWidth: 44
renderType: Text.NativeRendering
}
Rectangle {
@@ -537,6 +556,8 @@ ModuleChip {
anchors.centerIn: parent; text: "+"
color: lr.value >= lr.maxValue ? lr.dimColor : lr.textColor
font.pixelSize: 14
font.bold: true
renderType: Text.NativeRendering
}
HoverHandler { id: incHover; cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: { if (lr.value < lr.maxValue) lr.increment() } }

View File

@@ -44,7 +44,7 @@ PanelWindow {
mask: popupOpen ? null : _noInput
Region { id: _noInput }
TapHandler { onTapped: popup.close() }
MouseArea { anchors.fill: parent; onClicked: popup.close() }
Item {
id: popupClip

View File

@@ -6,7 +6,7 @@ import "themes"
QtObject {
id: root
readonly property var theme: Goldencity
readonly property var theme: Tropicalnight
// ────────────────────────────────────────────────────────────────────────
// Widgets

View File

@@ -6,10 +6,10 @@ QtObject {
id: theme
// ── Wallpaper ──────────────────────────────────────────────────────────────
readonly property string wallpaper: Quickshell.env("HOME") + "/.config/quickshell/wallpapers/tropicalnight.png"
readonly property string wallpaper: Quickshell.env("HOME") + "/.config/quickshell/wallpapers/Aaah.png"
// ── Base Backgrounds ───────────────────────────────────────────────────────
readonly property color bg: "#cc161a22" // Deep navy-black from silhouettes
readonly property color bg: "#fa161a22" // Deep navy-black from silhouettes
readonly property color bgPanel: "transparent"
readonly property color bgPopup: bg
readonly property color bgFrame: bg
@@ -19,7 +19,7 @@ QtObject {
// ── Text ──────────────────────────────────────────────────────────────────
readonly property color textMain: "#ffe8eef2" // Bright moonlit white
readonly property color textDim: "#997a8996" // Hazy horizon gray
readonly property color textDim: "#ffdfe6ea" // Lighter (closer to white)
readonly property color todayText: "#ffffffff"
// ── Accent & Borders ──────────────────────────────────────────────────────
@@ -40,7 +40,7 @@ QtObject {
// ── Stats Module ──────────────────────────────────────────────────────────
readonly property color statsBg: bgPanel
readonly property color statsBorder: border
readonly property color statsText: "#ff7a8996"
readonly property color statsText: "#ffdfe6ea"
readonly property color statsRingColor: accent
readonly property color statsCpuColor: "#ff89b4fa"
readonly property color statsMemColor: "#ffb4c9a1" // Soft moonlit green
@@ -87,11 +87,11 @@ QtObject {
readonly property color batPopupSeparator: separator
readonly property color batPopupHeader: accent
readonly property color batPopupText: textMain
readonly property color batPopupDim: textDim
readonly property color batPopupDim: "#ffdfe6ea"
readonly property color batProgressTrack: separator
readonly property color batProfileActiveText: bg
// ── Network Module ───────────────────────────────────────────────────────
// ── Network Module ───────────────────────────────────────────────────────
readonly property color netBg: bgPanel
readonly property color netBgHover: "#11ffffff"
readonly property color netBorder: border
@@ -102,7 +102,7 @@ QtObject {
readonly property color netPopupSeparator: separator
readonly property color netPopupHeader: accent
readonly property color netPopupText: textMain
readonly property color netPopupDim: textDim
readonly property color netPopupDim: "#ffdfe6ea"
readonly property color netFieldBg: "#22ffffff"
readonly property color netCancelBgHover: "#22ffffff"
readonly property color netConnectText: "#ff0c0e12"
@@ -121,10 +121,10 @@ QtObject {
readonly property color calSeparator: separator
readonly property color clockPopupHeader: accent
readonly property color clockPopupText: textMain
readonly property color clockPopupDim: textDim
readonly property color clockPopupDim: "#ffdfe6ea"
readonly property color clockPopupDate: textMain
readonly property color clockPopupUtc: textDim
readonly property color calArrowIcon: textDim
readonly property color clockPopupUtc: "#ffdfe6ea"
readonly property color calArrowIcon: "#ffdfe6ea"
readonly property color calArrowIconHover: accent
readonly property color calArrowBg: "transparent"
readonly property color calArrowBgHover: "#2289b4fa"
@@ -151,19 +151,19 @@ QtObject {
readonly property color trayMenuBg: bgPopup
readonly property color trayMenuBorder: borderPopup
readonly property color trayMenuText: textMain
readonly property color trayMenuDim: textDim
readonly property color trayMenuDim: "#ffdfe6ea"
readonly property color trayMenuHover: "#2289b4fa"
readonly property color trayMenuCheck: accent
readonly property color trayMenuSeparator: separator
// ── Launcher ─────────────────────────────────────────────────────────────
// ── Launcher ─────────────────────────────────────────────────────────────
readonly property color launcherBg: bgPopup
readonly property color launcherBorder: borderPopup
readonly property color launcherInput: "#44080a0d"
readonly property color launcherInputBorderFocus: accent
readonly property color launcherPill: "#444a5d6e"
readonly property color launcherText: textMain
readonly property color launcherDim: textDim
readonly property color launcherDim: "#ffdfe6ea"
readonly property color launcherAccent: accent
readonly property color launcherHover: "#2289b4fa"
readonly property color launcherSelected: "#4489b4fa"
@@ -188,18 +188,18 @@ QtObject {
readonly property color notifSeparator: separator
readonly property color notifDnd: separator
// ── Toast cards ───────────────────────────────────────────────────────────
// ── Toast cards ───────────────────────────────────────────────────────────
readonly property color notifToastBg: bgPopup
readonly property color notifToastBgHover: "#22ffffff"
readonly property color notifToastBorder: borderPopup
readonly property color notifToastText: textMain
readonly property color notifToastDim: textDim
readonly property color notifToastDim: "#ffdfe6ea"
readonly property color notifToastAppName: "#ff89b4fa"
// ── Urgency colours ───────────────────────────────────────────────────────
// ── Urgency colours ───────────────────────────────────────────────────────
readonly property color notifUrgencyCritical: statusErr
readonly property color notifUrgencyNormal: statusInfo
readonly property color notifUrgencyLow: textDim
readonly property color notifUrgencyLow: "#ffdfe6ea"
// ── Progress bar ───────────────────────────────────────────────────────────
readonly property color notifProgressBg: "#22ffffff"
@@ -209,20 +209,20 @@ QtObject {
readonly property color notifHistoryBg: bgPopup
readonly property color notifHistoryBorder: borderPopup
readonly property color notifHistoryHover: "#1189b4fa"
readonly property color notifHistoryEmpty: textDim
readonly property color notifHistoryEmpty: "#ffdfe6ea"
// ── BgDate Module ─────────────────────────────────────────────────────────
// ── BgDate Module ─────────────────────────────────────────────────────────
readonly property color bgDateText: accent
readonly property color bgDateShadow: "#88000000"
readonly property color bgDateSecondsText: accent
// ── Crypto Module ─────────────────────────────────────────────────────────
// ── Crypto Module ─────────────────────────────────────────────────────────
readonly property color cryptoBg: bgPanel
readonly property color cryptoBgHover: "#15ffffff"
readonly property color cryptoBorder: border
readonly property color cryptoBorderHover: accent
readonly property color cryptoIcon: accent
readonly property color cryptoLabel: textDim
readonly property color cryptoLabel: "#ffdfe6ea"
readonly property color cryptoValue: textMain
readonly property color cryptoUp: "#ffb4c9a1"
readonly property color cryptoDown: "#fff38ba8"
@@ -230,7 +230,7 @@ QtObject {
readonly property color cryptoPopupBorder: borderPopup
readonly property color cryptoPopupHeader: accent
readonly property color cryptoPopupText: textMain
readonly property color cryptoPopupDim: textDim
readonly property color cryptoPopupDim: "#ffdfe6ea"
readonly property color cryptoUpBg: Qt.rgba(cryptoUp.r, cryptoUp.g, cryptoUp.b, 0.13)
readonly property color cryptoDownBg: Qt.rgba(cryptoDown.r, cryptoDown.g, cryptoDown.b, 0.13)
@@ -247,7 +247,7 @@ QtObject {
readonly property color polkitTitle: textMain
readonly property color polkitMessage: "#cce8eef2"
readonly property color polkitPillBg: "#1a4a5d6e"
readonly property color polkitPillText: "#667a8996"
readonly property color polkitPillText: "#ffdfe6ea"
readonly property color polkitDivider: "#334a5d6e"
readonly property color polkitSuppErrBg: "#1af38ba8"
readonly property color polkitSuppErrBorder: "#44f38ba8"
@@ -258,9 +258,9 @@ QtObject {
readonly property color polkitFieldBg: "#44080a0d"
readonly property color polkitFieldBorder: "#22ffffff"
readonly property color polkitFieldBorderFocus: accent
readonly property color polkitUserLabel: "#997a8996"
readonly property color polkitUserLabel: "#ffdfe6ea"
readonly property color polkitUserValue: accent
readonly property color polkitInputPrompt: "#887a8996"
readonly property color polkitInputPrompt: "#88dfe6ea"
readonly property color polkitInputText: textMain
readonly property color polkitInputSelection: "#5589b4fa"
readonly property color polkitInputSelectedText: bg
@@ -274,5 +274,3 @@ QtObject {
readonly property color polkitCancelBorder: "#22ffffff"
readonly property color polkitCancelText: "#cce8eef2"
}

BIN
wallpapers/Aaah.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB