applets/weather: Refactor and Visual improvements of the Notices view
Refactor the Notices model and view
Simplify the notices model into a single list model, where the notice type is added as a property.
Now we can use a proper ListView with actual headers and a scrollbar. This fixes a historical issue where unwrapped text could make the applet wider.
Visual improvements for Warnings
- Improve the layout of the notices (warnings and watches), as a formatted tabbed list showing also their timestamp
- To access the expanded information link, use an information button instead of showing all the text as a link, which might make the text more difficult to read. Also hide the button when no link is provided.
- Add a Warning icon for the Notices tab, to make it more attention grabbing as these are usually emergency warnings.
BEFORE | AFTER | AFTER (env. Canada) |
---|---|---|
-
use Kirigami.ListSectionHeader for the headersRemove the sections header (Depends on plasma-workspace!3735 (merged)) - Show flags for event priority
Fortunately (for locals, not for debugging) is not that easy to trigger the Notices tab, so a tip for testing: go to https://www.dwd.de/DE/wetter/warnungen_gemeinden/warnWetter_node.html or https://weather.gc.ca/?layers=alert#wb-cont, and pick a place which is under some weather warning.
Depends on !519 (merged) and !520 (merged)
Edited by Ismael Asensio