Use KQuickCharts to render notification timeout as a circular progress bar
ClosedPublic

Authored by ahiemstra on Dec 14 2019, 3:53 PM.

Details

Summary

This uses the new KQuickCharts framework to render the notification timeout bar as a small
circular progress bar, around the close button.

Video:

Test Plan

notify-send -t 15000 test will first show a notification with no indicator, then once the
timeout gets to 10s or less it will show a decreasing circular progress bar.

Diff Detail

Repository
R120 Plasma Workspace
Branch
circular_timeout
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19851
Build 19869: arc lint + arc unit
ahiemstra created this revision.Dec 14 2019, 3:53 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 14 2019, 3:53 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ahiemstra requested review of this revision.Dec 14 2019, 3:53 PM
ahiemstra edited the summary of this revision. (Show Details)Dec 14 2019, 3:54 PM

So lovely! Because the layout respects the font metrics, aligning it perfectly within the close button might be a bit of a bear though. I'm using Ubuntu 11 as my font and I see this:

ahiemstra updated this revision to Diff 71533.Dec 14 2019, 4:53 PM
  • Remove limiting to just showing the last 10 seconds
  • Replace ToolButton IconItem with custom to fix alignment

Yay, the alignment is perfect now. :)

ahiemstra updated this revision to Diff 71534.Dec 14 2019, 5:10 PM
  • Re-add hiding behaviour on mouse over
ngraham added inline comments.Dec 14 2019, 5:26 PM
applets/notifications/package/contents/ui/NotificationHeader.qml
220

explicitly set to 0 and 1 rather than relying on implicit type conversion

ahiemstra updated this revision to Diff 71539.Dec 14 2019, 5:45 PM
  • Explicitly set opacity
ngraham accepted this revision.Dec 14 2019, 5:56 PM

Luuurvley!

This revision is now accepted and ready to land.Dec 14 2019, 5:56 PM
broulik accepted this revision.Dec 14 2019, 5:57 PM

Lovely

This revision was automatically updated to reflect the committed changes.