Feature/UI linux icon fix#40
Conversation
LennardKittner
left a comment
There was a problem hiding this comment.
Thanks for the PR. I have some minor suggestions.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| 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 { |
There was a problem hiding this comment.
How about "never" instead of "disabled" so the UI says "Automatic shutdown after: never" instead of "Automatic shutdown after: disabled".
| }; | ||
| let description = if device_properties.connected.unwrap_or(false) { | ||
| device_properties | ||
| .to_string_with_padding(0) |
There was a problem hiding this comment.
This function should also use format_int_value so that the tooltip is consistent with the context menu.
There was a problem hiding this comment.
Additionally, please consider adding format_int_value to the non-Linux tray app.
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.