UI: Made Bitwarden correct size

This commit is contained in:
2026-09-05 22:58:20 +01:00
parent 4aaa1d2d98
commit 99e2225b51
2 changed files with 19 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

View File

@@ -14,7 +14,7 @@ import "../../config"
// and a click launches it instead of doing nothing. // and a click launches it instead of doing nothing.
RowLayout { RowLayout {
id: root id: root
spacing: Appearance.spacing * 1 spacing: Appearance.spacing * 1.
// name: matched case-insensitively against a tray item's id/title to // name: matched case-insensitively against a tray item's id/title to
// find this app's live icon, once it's running. // find this app's live icon, once it's running.
@@ -27,8 +27,15 @@ RowLayout {
readonly property var pinned: [ readonly property var pinned: [
{ {
name: "Bitwarden", name: "Bitwarden",
icon: "bitwarden", // The system "bitwarden" icon (any size) bakes in a ~10% safe
launch: ["bitwarden-desktop", "--ozone-platform-hint=auto", "--silent"], // margin around the shield, like most launcher icons do — fine
// on a desktop grid, but next to Bitwarden's own edge-to-edge
// tray icon it reads as noticeably smaller in the same box. This
// is that same icon (the 1024x1024 source, for a clean
// downscale) with that transparent margin trimmed off, so it
// fills its slot exactly like the live tray icon does.
icon: Qt.resolvedUrl("../../assets/bitwarden.png"),
launch: ["bitwarden"],
}, },
{ {
name: "Sunshine", name: "Sunshine",
@@ -63,10 +70,15 @@ RowLayout {
IconImage { IconImage {
anchors.fill: parent anchors.fill: parent
source: slot.running ? slot.trayItem.icon : Quickshell.iconPath(slot.modelData.icon) // icon may be a plain theme name (looked up via
// Not-running is the only cue we give beyond the click // Quickshell.iconPath) or a file:// URL straight to a
// behavior itself — dimmed rather than hidden or badged, so // specific asset (Bitwarden, above) — Quickshell.iconPath()
// the icon stays put and clickable either way. // only understands theme names, so a URL is used as-is.
source: slot.running
? slot.trayItem.icon
: (slot.modelData.icon.includes("://")
? slot.modelData.icon
: Quickshell.iconPath(slot.modelData.icon))
opacity: slot.running ? 1.0 : 0.5 opacity: slot.running ? 1.0 : 0.5
} }