Fix ToolButton remaining in a pressed state after press
ClosedPublic

Authored by filipf on May 4 2019, 8:50 PM.

Details

Summary

If you click on a QQC2 ToolButton it will remain in its pressed state, meaning it has a background with highlight color. The problem is in our style so I'm just mimicking D18284 as a solution.

Test Plan

Before:

After:

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
filipf created this revision.May 4 2019, 8:50 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 4 2019, 8:50 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.May 4 2019, 8:50 PM
filipf edited the summary of this revision. (Show Details)May 4 2019, 8:53 PM
filipf edited the test plan for this revision. (Show Details)
filipf added reviewers: mart, Plasma, ngraham, davidedmundson.
davidedmundson accepted this revision.May 4 2019, 9:04 PM
This revision is now accepted and ready to land.May 4 2019, 9:04 PM
ngraham accepted this revision.May 6 2019, 9:56 PM

Nice little papercut fix!

filipf added a comment.May 8 2019, 8:06 PM

@mart does this look good to you? As you're the author I wouldn't want to merge without your approval.

mart added a comment.May 9 2019, 2:07 PM

but now it doesn't display the checked state in any way?

mart requested changes to this revision.May 9 2019, 2:07 PM
This revision now requires changes to proceed.May 9 2019, 2:07 PM
filipf added a comment.Jun 1 2019, 8:49 PM
In D21026#462978, @mart wrote:

but now it doesn't display the checked state in any way?

How can I test to see the checked state is working?

Add checkable: true and click it

filipf updated this revision to Diff 58994.Jun 1 2019, 10:33 PM

restore checkable state

Add checkable: true and click it

Thanks! I tested it with this in a vacuum and with D21027 and it seems to be working as it should now as far as I can tell.

@mart is this okay now?

This revision was not accepted when it landed; it landed in state Needs Review.Jun 21 2019, 9:37 AM
This revision was automatically updated to reflect the committed changes.