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.
RowLayout {
id: root
spacing: Appearance.spacing * 1
spacing: Appearance.spacing * 1.
// name: matched case-insensitively against a tray item's id/title to
// find this app's live icon, once it's running.
@@ -27,8 +27,15 @@ RowLayout {
readonly property var pinned: [
{
name: "Bitwarden",
icon: "bitwarden",
launch: ["bitwarden-desktop", "--ozone-platform-hint=auto", "--silent"],
// The system "bitwarden" icon (any size) bakes in a ~10% safe
// 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",
@@ -63,10 +70,15 @@ RowLayout {
IconImage {
anchors.fill: parent
source: slot.running ? slot.trayItem.icon : Quickshell.iconPath(slot.modelData.icon)
// Not-running is the only cue we give beyond the click
// behavior itself — dimmed rather than hidden or badged, so
// the icon stays put and clickable either way.
// icon may be a plain theme name (looked up via
// Quickshell.iconPath) or a file:// URL straight to a
// specific asset (Bitwarden, above) — Quickshell.iconPath()
// 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
}