Skip to content

Feature/UI linux icon fix#40

Open
vxel wants to merge 2 commits intoLennardKittner:devfrom
vxel:feature/ui_linux_icon_fix
Open

Feature/UI linux icon fix#40
vxel wants to merge 2 commits intoLennardKittner:devfrom
vxel:feature/ui_linux_icon_fix

Conversation

@vxel
Copy link
Copy Markdown

@vxel vxel commented Apr 30, 2026

Two small UI polish fixes for the tray menu:

Use symbolic icon variants for system tray on Linux

Linux tray icons (headset, battery levels, charging variants) were resolved against the freedesktop icon theme without the -symbolic suffix, which on most modern themes (Yaru, Adwaita...) returns the full-color PNG variant. Since system tray indicators are expected to be monochrome and adapt to light/dark themes, this looked out of place.

Switched all icon names emitted by linux_icon_name() and the tooltip fallback to their -symbolic variants (audio-headset-symbolic, battery-{caution,low,medium,good,full}-symbolic, plus the -charging-symbolic variants). The icons now render as clean monochrome glyphs that match the rest of the tray.

Auto shutdown label

Auto shutdown label: the "Disabled" choice was rendered as 0min in both the parent menu entry and the submenu options, which is misleading. Added a small formatter that displays Disabled whenever the value is 0 and the unit suffix is min, leaving all other values unchanged.

Copy link
Copy Markdown
Owner

@LennardKittner LennardKittner left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I have some minor suggestions.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Using my current icon pack, BeautyLine, most symbolic battery indicators look the same. Furthermore, battery-medium-symbolic seems not to exist in my icon pack.
I think it would be best to not make this the default and instead add a flag, something like --monochrome-icons to enable monochrome icons.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

That makes sense. The use of symbolic icons is a convention on recent Gnome/Gtk distrib (see here) but not necessarily followed everywhere. I will work on this option.

Comment thread src/status_tray.rs
const NO_COMPATIBLE_DEVICE: &str = "No compatible device found.\nIs the dongle plugged in?\nIf you are using Linux did you\nadd the Udev rules?";
const HEADSET_NOT_CONNECTED: &str = "Headset is not connected";

fn format_int_value(value: u8, suffix: &str) -> String {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

How about "never" instead of "disabled" so the UI says "Automatic shutdown after: never" instead of "Automatic shutdown after: disabled".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yep, good idea

Comment thread src/status_tray.rs
};
let description = if device_properties.connected.unwrap_or(false) {
device_properties
.to_string_with_padding(0)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This function should also use format_int_value so that the tooltip is consistent with the context menu.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Additionally, please consider adding format_int_value to the non-Linux tray app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants