Skip to content

fix(tray): svg's did not load#1397

Open
pancakedevourer wants to merge 9 commits intoJakeStanger:masterfrom
pancakedevourer:fix/tray-svg-icons
Open

fix(tray): svg's did not load#1397
pancakedevourer wants to merge 9 commits intoJakeStanger:masterfrom
pancakedevourer:fix/tray-svg-icons

Conversation

@pancakedevourer
Copy link

SVG icons couldn't load in the tray before, and showed a disconnected icon.

fixes #1221

@github-actions github-actions bot added the Z:Review Required Pull request pending review label Feb 24, 2026
@JakeStanger
Copy link
Owner

Thanks for this. I think this somewhat duplicates the logic in tray::icon (or really, that duplicates the logic here).

https://github.com/JakeStanger/ironbar/blob/83e872885924f5c53d8c42791451c59632e9ec4a/src/modules/tray/icon.rs#L26C4-L26C28?target=https://github.com

Are you able to have a look and see if there's any opportunity to clear that up a bit please? Ideally we'd have one path through.

@JakeStanger JakeStanger added Z:Changes Requested Pull request awaiting changes from author and removed Z:Review Required Pull request pending review labels Feb 24, 2026
@github-actions github-actions bot added Z:Review Required Pull request pending review and removed Z:Changes Requested Pull request awaiting changes from author labels Feb 25, 2026
@pancakedevourer
Copy link
Author

pancakedevourer commented Feb 25, 2026

Sorry for the holdup, cleaned it up. Logic is in icon.rs now

@JakeStanger
Copy link
Owner

Thanks. Can you have a look at the failing build please?

@pancakedevourer
Copy link
Author

Whoops, fixed it

use system_tray::item::IconPixmap;
use tokio::sync::mpsc;
use tracing::{debug, error, trace, warn};

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-add the whitespace between lines that's been removed throughout this file

Comment on lines +409 to +413
// Register a fresh picture and ensure a label widget exists,
// then load the image asynchronously.
let picture = Picture::builder()
.content_fit(ContentFit::ScaleDown)
.build();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we creating a new picture instead of using the existing one?

@JakeStanger JakeStanger added Z:Changes Requested Pull request awaiting changes from author and removed Z:Review Required Pull request pending review labels Mar 1, 2026
@github-actions github-actions bot added Z:Review Required Pull request pending review and removed Z:Changes Requested Pull request awaiting changes from author labels Mar 1, 2026
@pancakedevourer
Copy link
Author

Here you go. Kakoune removed most of the whitespace when I saved the file, for some unbeknownst reason

@JakeStanger JakeStanger self-assigned this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z:Review Required Pull request pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tray: SVG icons do not load

2 participants