Fix layout of resolution selection
ClosedPublic

Authored by gladhorn on Jul 24 2018, 10:16 AM.

Details

Summary

When there is only one widget inside the layout, it would have double
margins. In case of the slider, the top and bottom margins are slightly
off (same as before), but at least on the left and right they now fit.

Diff Detail

Repository
R104 KScreen
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gladhorn created this revision.Jul 24 2018, 10:16 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 24 2018, 10:16 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gladhorn requested review of this revision.Jul 24 2018, 10:16 AM
gladhorn added a comment.EditedJul 24 2018, 10:17 AM


Before and after with the slider and combo box version.

zzag added a subscriber: zzag.Jul 24 2018, 10:24 AM

How does it look with the slider?

Off-topic: Is the slider a good idea from UX/UI perspective?

The slider case after looks misaligned here now. I think you should set margins to zero only for the ComboBox case where there is only that single widget?

How does it look with the slider?

There's screenshots. This patch is solely about the margins, not the fact that it uses a slider or combobox

Off-topic: Is the slider a good idea from UX/UI perspective?

That is why it uses a QComboBox if there are too many options

The slider case after looks misaligned here now. I think you should set margins to zero only for the ComboBox case where there is only that single widget?

I disagree, before the 720x400 in your example would have double spacing and not be alined with the checkbox above or combo below. It also had extra space on the right for no good reason. Why should it have extra spacing?

The slider case after looks misaligned here now. I think you should set margins to zero only for the ComboBox case where there is only that single widget?

I disagree, before the 720x400 in your example would have double spacing and not be alined with the checkbox above or combo below. It also had extra space on the right for no good reason. Why should it have extra spacing?

However we do it, in the above screenshot, the slider's label should be visually top-aligned so that it lines up with the resolution text on top.

abetts added a subscriber: abetts.Jul 24 2018, 2:10 PM

+1 on the visual changes!


Before and after with the slider and combo box version.

In the up arrow for the combobox that says "Normal". What is the arrow supposed to mean?


Before and after with the slider and combo box version.

In the up arrow for the combobox that says "Normal". What is the arrow supposed to mean?

There are "arrows" used for all rotations.
(Note that that's completely unrelated to the change)


Before and after with the slider and combo box version.

In the up arrow for the combobox that says "Normal". What is the arrow supposed to mean?

There are "arrows" used for all rotations.
(Note that that's completely unrelated to the change)

I know it is unrelated. I think we may have to reevaluate those icons since they look confusing to the down arrow used by the combobox. Work for later. Thanks.

The thing is that you should bring more focus to the screen factor setting. Ordinary you should not change the screen resolution you should change the factor on hidpi this should be in focus.
Nobody should change the resolution and the rate by default cause best result will always automatic setting.
Thats the reason thomas prefer the drop down from ux perspective when i say use the slider.

OK, so shall we discuss the general KCM in https://phabricator.kde.org/T7254 or https://phabricator.kde.org/T4066 or https://phabricator.kde.org/T3464 ? all of them seem to be duplicates, but I don't know how to handle that.

Let's centralize the discussion in T7254. I've closed the other two.

In the meantime, I'd like opinions on this change, I'm still a big fan of small steps in the right direction which will reach users soon, since I'm unsure if the big re-design will be implemented in the near future.

I agree. +1 on how it looks with a combobox. Is there any way to manually remove resolutions so I can get it to use a slider and test that case?

I agree. +1 on how it looks with a combobox. Is there any way to manually remove resolutions so I can get it to use a slider and test that case?

Just change the if condition (e.g. if (false) instead of if (mModes.count() > 15) in the line after to force it, you may have a few too many steps on the slider, but that'll be fine I think.

Thanks, that should have been obvious! :p

I get the same layout issue as Kai with the slider though. With the slider, the label on the left should be top-aligned. and line up with the slider's line.

ngraham requested changes to this revision.Jul 25 2018, 1:56 PM
This revision now requires changes to proceed.Jul 25 2018, 1:56 PM

The alignment previous to this commit is also not given, it just happens to look a hint better.

gladhorn updated this revision to Diff 38515.Jul 26 2018, 3:50 PM

Fix the layout

gladhorn edited the summary of this revision. (Show Details)Jul 26 2018, 4:24 PM
ngraham accepted this revision.Jul 26 2018, 11:12 PM
This revision is now accepted and ready to land.Jul 26 2018, 11:12 PM
This revision was automatically updated to reflect the committed changes.