[Tests]Make radiobutton3.qml use PC3
ClosedPublic

Authored by gvgeo on Feb 1 2020, 8:43 AM.

Details

Summary

Correct test radiobutton3.qml to use Plasma Components 3 instead of 2.

Test Plan

Run qmlscene radiobutton3.qml
Before:
Misaligned button and big height. (bug in PC2 radiobutton)
After:
Correct height and alignment between button and button's text.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gvgeo created this revision.Feb 1 2020, 8:43 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 1 2020, 8:43 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
gvgeo requested review of this revision.Feb 1 2020, 8:43 AM
gvgeo added a comment.Feb 1 2020, 8:44 AM

Because PC3 label is shorter that PC3 checkbox, there is a misalignment than need fixing. Either need to change label to have a height similar to PC2 (1.6*fontHeight). Or need to change this test's text vertical alignment.

gvgeo retitled this revision from Make radiobutton3.qml use PC3 to [Tests]Make radiobutton3.qml use PC3.Feb 1 2020, 8:47 AM
gvgeo edited the summary of this revision. (Show Details)
ndavis added a comment.Feb 1 2020, 7:24 PM

I'm not really the best person to review this, but it seems to work. The test still has poor horizontal alignment and the button doesn't have the correct size.

ndavis added a comment.Feb 1 2020, 7:27 PM

Well, it has the correct size in that it's 16x16, but it's like it was stretched and cropped.

gvgeo removed a reviewer: ndavis.EditedFeb 2 2020, 6:28 AM
gvgeo added a subscriber: ndavis.

poor horizontal alignment

Don't make me redraw PC3 tests too. The basis of the issue is the same, different Label than Button height. For PC3 label is shorter than buttons.

PC2 tests


This shows the problem.
Don't know what is the correct approach:
1 Label needs to be shorter.
2 Give correct height in checkbox, and center the buttons.
3 Override label height in radiobutton, to make everything slim. Will need to center when used.

Either need to increase label height to button height, or need to center label in the test (and everywhere else it is used.)


Well, it has the correct size in that it's 16x16, but it's like it was stretched and crop

Others would say "The position of the left side is off by half a pixel".
The cause of it and solution, as I interpret them is D27083.


I'm not really the best person to review this

I made these 2 patches based on your feedback, and thought it would be a good idea to see them. There, fixed it :)

davidedmundson accepted this revision.Feb 2 2020, 8:09 AM
davidedmundson added a subscriber: davidedmundson.

Regardless of issues, the change for the test is correct.

We should break the test to highlight issues. Ship it!

This revision is now accepted and ready to land.Feb 2 2020, 8:09 AM
gvgeo added a comment.Feb 3 2020, 11:49 AM

Ship it!

I can't do that, someone else need to commit it.

I can't do that, someone else need to commit it.

Then lets fix that.

You can apply for a developer account (there should be a button on identity.kde.org) and tag me and Nate as approvers.

ngraham added a subscriber: ngraham.Feb 3 2020, 6:15 PM

Additional documentation is at https://community.kde.org/Infrastructure/Get_a_Developer_Account

Definitely apply! You've earned it.

gvgeo added a comment.Feb 4 2020, 3:54 AM

I 'll ask you to keep committing my patches a little longer.
At least for my current patches, and their related bugfixes.

All right, your choice. I'll land this for you now. Great work!

This revision was automatically updated to reflect the committed changes.