Make KCMultiDialog scrollable
ClosedPublic

Authored by valeriymalov on Aug 23 2017, 3:38 PM.

Details

Summary

Put KCModuleProxy into a QScrollArea the same way SystemSettings does
This should make kcmshell and other users of KCMultiDialog
a bit more friendly to small screens

However, this assumes that KCMs don't have their own scrollbars
(at least sytsemsettings ones don't) and preferably have a size hint
(only a few or none actually have; at least kscreen needs patching)

BUG: 354227

Also, reorder headers of the unit

Test Plan

doesn't break systemsettings/kcmshell/kmail settings
kcmshell kscreen takes some time initializing
so it starts very small (patch ready)

Diff Detail

Repository
R295 KCMUtils
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
valeriymalov created this revision.Aug 23 2017, 3:38 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 23 2017, 3:38 PM

+1

but re-arrange the includes in a separate commit as it's not really related to this.

System Settings has its own scroll bars anyway, so I think no KCM adds them on its own.

Split commit in two (hopefully)

wbauer added a subscriber: wbauer.Aug 25 2017, 9:06 PM

The referenced bug number seems to be wrong.

valeriymalov edited the summary of this revision. (Show Details)

Oops, should be fixed now

davidedmundson accepted this revision.Sep 1 2017, 10:40 AM
davidedmundson added a subscriber: davidedmundson.

For some reason "kcmshell5 kscreen" looks awful. It comes up tiny.

Most the rest seem OK (I checked ~15) . There must be something very specific about that one. If you could take a look that would be great.

As the next frameworks release is so soon, I'd like to see this wait until after 5.38 is tagged before merging, just to give us time to find if there are any other issues.

This revision is now accepted and ready to land.Sep 1 2017, 10:40 AM

For some reason "kcmshell5 kscreen" looks awful. It comes up tiny.

This seems to be caused by the way KScreen's KCM is initialized, probably because of QML? Window content seems to load a split second after the window actually comes up.

Setting sizeHint for KCMKScreen circumvents this, although I'm not sure if that's the correct way to fix this.

aacid closed this revision.Sep 5 2017, 8:18 PM
ngraham added a subscriber: ngraham.Aug 5 2018, 6:46 PM

This has caused some pain with a number of KCMs, most notably plasma-nm and kscreen, but also others too (languages, shortcuts, powerdevil, activities). See all the duplicates of https://bugs.kde.org/show_bug.cgi?id=389585

It's especially noticeable for plasma-nm because the plasmoid gives you a button that opens the full KCM in kcmshell5, where it gets the wrong size and the controls on the bottom are not visible without scrolling.

KScreen actually does set a sizeHint, but it doesn't seem to get passed on to the scroll area.

Restricted Application added a subscriber: kde-frameworks-devel. · View Herald TranscriptAug 5 2018, 6:46 PM