[KCM]Fix content below scrollbars
ClosedPublic

Authored by gvgeo on Feb 22 2020, 2:18 PM.

Details

Summary

Set content to use available space.
Make scrollbars touch the side of the frame.
Fit speaker test grid inside the scrollview area.
Fix advanced content layout.
Make Header always fit inside the scrollview area.

BUG:416331
BUG:417447

Test Plan

Open audio settings from kickoff.

Before:

After:

Diff Detail

Repository
R115 Plasma Audio Volume Applet
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 22 2020, 2:18 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 22 2020, 2:18 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gvgeo requested review of this revision.Feb 22 2020, 2:18 PM
gvgeo edited the test plan for this revision. (Show Details)Feb 22 2020, 2:22 PM
apol added a subscriber: apol.Feb 23 2020, 12:47 AM
apol added inline comments.
src/kcm/package/contents/ui/Advanced.qml
34

What if there's too many devices?
It doesn't sound like a good solution to hide the ScrollBar forever.

Also what does contentview refer to?

gvgeo added inline comments.Feb 23 2020, 1:56 AM
src/kcm/package/contents/ui/Advanced.qml
34

What if there's too many devices?

No matter how many devices there are, column is always a column.

It doesn't sound like a good solution to hide the ScrollBar forever.

That's why a TODO comment exist.

Also what does contentview refer to?

The width of the content. Need to remove "view".

ContentWidth calculates most of the text with contentWidth instead of paintedWidth.
Have not found the loop.

gvgeo updated this revision to Diff 76200.Feb 23 2020, 2:50 AM
gvgeo edited the test plan for this revision. (Show Details)

Changed comment.

gvgeo marked 2 inline comments as done.Feb 23 2020, 2:51 AM
gvgeo updated this revision to Diff 76201.Feb 23 2020, 8:27 AM

Make scrollbars touch the side of the frame.
Fit speaker test grid inside the scrollview area.
Fix advanced content layout.
Make Header always fit inside the scrollview area.

gvgeo edited the summary of this revision. (Show Details)Feb 23 2020, 8:27 AM

The changes to labels in Header.qml seem unrelated.

gvgeo added a comment.Feb 24 2020, 6:12 AM

The changes to labels in Header.qml seem unrelated.

They are as related as the other 4 changes are.
Either will make 5 different patches or 1. But I'm not going to change back and forth.

As far as I can tell, the other four changes are related to the scrollbar/view sizing/positioning. The other change to center labels may fix an issue, but it still represents a stylistic change. It should either be in a separate patch, or else it needs to be explicitly explained in the Summary and/or Description section.

gvgeo added a comment.EditedFeb 24 2020, 2:22 PM

I would not call them stylistic choice, the position didn't change. And there are included in description.

Make Header always fit inside the scrollview area.

They had 2 different problems, when the text is too big.
As enabled they would cut text left and right.
And as disabled would make the page wide with vertical scrollbar.
And If I remember correctly, would display under the scrollbar.

The other change to center labels

They were already centered.

ngraham accepted this revision.Feb 24 2020, 2:40 PM

The other change to center labels

They were already centered.

Oops, my bad.

Seems like material for the stable branch. Have you gotten your developer account approved yet?

https://community.kde.org/Infrastructure/Phabricator#Landing_on_the_.22Stable_branch.22

This revision is now accepted and ready to land.Feb 24 2020, 2:40 PM
gvgeo added a comment.EditedFeb 24 2020, 4:10 PM

Today for 5.18.2 or can wait?
Apol only looked the code for the first change.
And I don't know why vertical margins create bind loop(Solved), or if Item as a proxy is good(found it in others areas too).

We can wait a bit to get more eyes on it and target 5.18.3.

gvgeo updated this revision to Diff 76467.Feb 26 2020, 2:38 PM

Added item as a proxy for the devices and applications. This fixed the vertical binding loop.
And made scrollbar touch the top and botoom edges.

With this patch content is closer, by smallSpacing, to the frame.
And content touch top and bottom when scrolling.

ngraham accepted this revision.Feb 26 2020, 6:40 PM
gvgeo added a comment.Feb 29 2020, 7:58 AM

I don't see any objections, will push to stable.

+1, go ahead

This revision was automatically updated to reflect the committed changes.