Created attachment 148698 [details] If the degree number is rounded and the units are removed, the widget could take roughly half the space. SUMMARY This is a **feature request** about the Weather Report tray widget. Not sure if I've categorized this issue correctly. The widget currently shows degrees with 1-digit precision (e.g. `15.0`). It also shows the unit (e.g. `°C` to `°F`). Both of these take space for not much benefit. Surely, by default, the unit should be there, so that new users could more easily figure out what it is and configure it accordingly. But on my own desktop, I know that I'm using `°C`, so I don't need to see it there all the time. Similarly, `15.0` takes up 2 more characters than necessary (compared to just `15`). I (and possibly most other people) don't need sub-degree precision. The Weather Report wiget could introduce some compact mode which: - hides the unit (`°C` to `°F`) - rounds the numbers (`15.0` -> `15`) Doing this, the widget's horizontal space could be cut in half, saving useful space in the tray. Instead of a "compact mode", checkboxes may be introduced for each of the above (unit hiding / number-rounding), so they can be controlled separately.
If we removed the unit, it wouldn't be obvious what the number is, or even what applet is belongs to. If we removed the trailing ".0" then the applet would grow and shrink anytime the temperature changed from an integer to a decimal number, and people really don't like that. If we simply rounded the number to the nearest integer, then we'd be losing precision since 14C and 15C are rather different temperatures. I think we have to keep this the way it is, sorry.
I didn't mean to just cut off the `.0` part, but to always round to the nearest integer if configured that way. 14C and 15C are somewhat different temperatures (1 degree), but rounding (instead of just cutting off the decimal part) only loses half a degree of precision. To me, and I believe to many others, half a degree rounding in any direction is pretty much the same thing. In fact, popular weather services around here always use integer numbers for degrees. I'm not sure the BBC weather API is even returning anything else besides `.0` anyway. Looking at AccuWeather's website, it seems like it doesn't use fractions either, so I don't think people expect to see fractions in their tray widget.
That being the case, I wonder if we should simply always round it.
Yeah, I think we can consider rounding the temperature.
Submitted https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/156 to do that.
Git commit c5d274b8efe1992d3eb523d931b9631bbe09a7b0 by Nate Graham. Committed on 13/05/2022 at 04:13. Pushed by ngraham into branch 'master'. applets/weather: Always Round temperature None of the weather providers still provide decimals for the temperature, so we just always end up displaying "25.0" as the temperature. So let's round it to get rid of the unnecessary decimal. FIXED-IN: 5.25 M +1 -1 applets/weather/package/contents/ui/IconAndTextItem.qml M +1 -1 applets/weather/package/contents/ui/main.qml https://invent.kde.org/plasma/kdeplasma-addons/commit/c5d274b8efe1992d3eb523d931b9631bbe09a7b0