[Task Manager] Use ToolButtons for buttons in popup, rather than mouseArea+icon
ClosedPublic

Authored by ngraham on Jun 6 2019, 5:06 PM.

Details

Summary

Right now, the Task Manager's popup has various buttons in it that do not look or
feel like buttons because they are implemented as a MouseArea with an Icon inside.

This patch makes them feel like standard buttons uses elsewhere by implementing
them using ToolButtons instead.

Test Plan


Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Jun 6 2019, 5:06 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 6 2019, 5:06 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Jun 6 2019, 5:06 PM
ndavis accepted this revision.Jun 6 2019, 5:08 PM
ndavis added a subscriber: ndavis.

Makes sense to be consistent about how we present buttons.

This revision is now accepted and ready to land.Jun 6 2019, 5:08 PM
filipf added a subscriber: filipf.Jun 6 2019, 5:08 PM

It is also makes it consistent with the notification popup. Let me give it a quick spin.

filipf accepted this revision.EditedJun 6 2019, 5:23 PM

+1 buttons should be buttons unless there's really strong designer reasons such as in the login screen etc. I'm also enjoying this a lot more than than just having icons.

BTW when talking about consistency, do we also apply this change to the media player applet?

EDIT: disregard last comment, I was looking at 5.15.

applets/taskmanager/package/contents/ui/ToolTipInstance.qml
336

Do we also have the issue here that the tool button will grow in size but not the icon inside it? Seems OK when I bump up the scaling.

ndavis added a comment.Jun 6 2019, 5:25 PM

BTW when talking about consistency, do we also apply this change to the media player applet?

The media player applet already has ToolButtons.

ngraham added inline comments.Jun 6 2019, 5:34 PM
applets/taskmanager/package/contents/ui/ToolTipInstance.qml
336

Nah, the out-of-the-box behavior is fine, that comment is just there to indicate what needs to happen before we can make the Play button bigger, as it is without this patch.

abetts added a subscriber: abetts.Jun 6 2019, 5:44 PM

+1

We might need to add some padding so the button frame doesn't overlay content on the background

+1

We might need to add some padding so the button frame doesn't overlay content on the background

That's a pre-existing bug only visible when the pop-up isn't displaying a media preview. We can fix that in another revision.

filipf added a comment.EditedJun 6 2019, 6:39 PM

+1

We might need to add some padding so the button frame doesn't overlay content on the background

As far as I can tell the button is actually within it's own frame/rectangle, it's Elisa's icon that drops too low and then sits behind the frame/rectangle.

ngraham updated this revision to Diff 59289.Jun 6 2019, 7:07 PM

Remove TODO and formalize that the buttons should all be the same size

ngraham marked 2 inline comments as done.Jun 6 2019, 7:11 PM
broulik accepted this revision.Jun 7 2019, 8:30 AM
broulik added a subscriber: broulik.

Looks good. Perhaps now that we can have proper tooltips for the buttons we should add some?

This revision was automatically updated to reflect the committed changes.