[KCM]Update Device item layout based on applet
ClosedPublic

Authored by gvgeo on Feb 15 2020, 12:53 PM.

Details

Summary

Remove device icon.
Remove separation line between devices and increase spacing.
Use radioboxes for default device selection.
Always allow port selection.
Fix mute tooltip.
Use small spacing instead of default.
Use plasma components 3 instead of qtquick controls 2.
Remove unused imports.

BUG: 417607
CCBUG: 417447
FIXED-IN: 5.19.0

Doesn't depend, but needs D27420 to activate an unavailable port.

Test Plan

Before:
Was not possible to select an unavailable port.
Combobox could drive the default button out of the layout.
After:
Combobox row appears for devices that have at least two ports.

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Branch
kcmports2
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22645
Build 22663: arc lint + arc unit
gvgeo created this revision.Feb 15 2020, 12:53 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 15 2020, 12:53 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gvgeo requested review of this revision.Feb 15 2020, 12:53 PM
gvgeo edited the test plan for this revision. (Show Details)Feb 15 2020, 12:56 PM
gvgeo edited the summary of this revision. (Show Details)Feb 15 2020, 12:59 PM
gvgeo edited the summary of this revision. (Show Details)Feb 15 2020, 1:05 PM
gvgeo edited the summary of this revision. (Show Details)Feb 15 2020, 1:13 PM
gvgeo edited the summary of this revision. (Show Details)Feb 15 2020, 1:16 PM
gvgeo added a reviewer: VDG.Feb 15 2020, 3:45 PM

If default button can leave, personally I would prefer this layout (ignore the margins).


And it could help avoid bugs like "applet missing the default button".

If default button can leave, personally I would prefer this layout (ignore the margins).


And it could help avoid bugs like "applet missing the default button".

+1, let's do that. Better to make the default device selection UI look like it does in the applet, now that it's been changed there.

ngraham edited the summary of this revision. (Show Details)Feb 15 2020, 6:05 PM
gvgeo updated this revision to Diff 75758.Feb 16 2020, 8:53 AM

Update Layout

gvgeo updated this revision to Diff 75760.Feb 16 2020, 9:05 AM

Use PC3 and remove unused imports.

gvgeo retitled this revision from [KCM]Always allow port selection to [KCM]Update Device item layout based on applet.Feb 16 2020, 9:09 AM
gvgeo edited the summary of this revision. (Show Details)
gvgeo edited the test plan for this revision. (Show Details)
ngraham requested changes to this revision.Feb 16 2020, 5:41 PM

Don't use PlasmaComponents in KCMs; it's for Applets and other elements of the Plasma shell itself. Kirigami is the correct choice for a KCM.

This revision now requires changes to proceed.Feb 16 2020, 5:41 PM
gvgeo updated this revision to Diff 75818.Feb 17 2020, 11:27 AM

Remove PlasmaComponents.

So.. why all these different distinctions exist?

gvgeo updated this revision to Diff 75819.Feb 17 2020, 11:29 AM

Restore imports.

ngraham accepted this revision.Feb 18 2020, 5:14 AM

LGTM. Plasma folks?

Remove PlasmaComponents.

So.. why all these different distinctions exist?

History.

The original PlasmaComponents was created first, after QML was invented, but before QtQuick. Then QtQuick was invented, and PlasmaComponents was re-done to be based on it and called "PlasmaComponents2". Then QtQuick2 was invented, and "PlasmaComponents3" was created with the expectation to porting to that.

In the meantime, people started to want to use QML for non-Plasma user interfaces. So a QQC2 desktop style bridge was created, hence the qqc2-desktop-style framework. However people were not satisfied with the primitive state of QQC2 components so we started to make higher-level versions (e.g. drawers, pages with toolbars and navigation) and called it Kirigami.

I expect in the future that PlasmaComponents (all versions) will go away, and if we want to retain some plasma-specific styling, that will be done in a different way that does not require a separate component library. See T11558.

This revision is now accepted and ready to land.Feb 18 2020, 5:14 AM
ngraham edited the summary of this revision. (Show Details)Feb 18 2020, 5:14 AM
gvgeo added a comment.Feb 18 2020, 4:48 PM

Thanks Nate, both for explaining and taking care of the patches yesterday.

You're welcome!

gvgeo updated this revision to Diff 75935.Feb 18 2020, 6:25 PM

More style fixes. (indentation restore)

gvgeo added a comment.EditedFeb 18 2020, 8:15 PM

Although this is a general problem, just to be clear. Without Plasma Components I don't get proper scaling.

davidedmundson added inline comments.
src/kcm/package/contents/ui/DeviceListItem.qml
32

Kirigami.Units.smallSpacing please

(for all units in KCM code)

again, for complex reasons, sorry.

106

Do you need this?

It should be the same as Layout.fillWidth which will be on by default for a layout in a layout

gvgeo updated this revision to Diff 75971.Feb 19 2020, 9:31 AM

Kirigami units.
Remove unnecessary preferred width.

gvgeo marked 2 inline comments as done.Feb 19 2020, 9:31 AM

I'm seeing some weird jagginess on radio buttons, slider handles, and combobox shadows:

This is just 1x scaling with no weird font DPI fiddling.

gvgeo added a comment.EditedFeb 19 2020, 5:57 PM

I'm seeing some weird jagginess on radio buttons, slider handles, and combobox shadows:

I cannot replicate this. And I cannot see how I could have created this. Or where to start.

Here's my short list of problems.

I believe these 6 are known.
1.Default size too small, content disappears. D27648
2.Content goes up. D27608
5.Content under the scrollbars. D27577
7.ComboBox text cut when scaled.
8.ComboBox change sizes.
9.Controls have incorrect scaling. https://bugs.kde.org/show_bug.cgi?id=356446

~~~~~
3.Slider too big. Preferred width, which was removed in last patch update is needed. To replicate click applications and go back to devices. Fixed in this patch
4.Number is lower from the slider's center line. D27645
6.Mute top margin is just random. D27645
10.Speaker test Grid.

gvgeo updated this revision to Diff 76093.Feb 21 2020, 11:36 AM

Fix problem 3

gvgeo updated this revision to Diff 76475.EditedFeb 26 2020, 5:09 PM

Hide portbox if window is too small.

Minimum label size before the portbox disappears.

gvgeo added a comment.Mar 3 2020, 11:24 AM

I'm seeing some weird jagginess on radio buttons, slider handles, and combobox shadows:

This is just 1x scaling with no weird font DPI fiddling.

Is it a problem with this patch or can this land?

ngraham accepted this revision.Mar 3 2020, 5:29 PM

Ship it, the jagginess is clearly caused by something lower in the stack.

This revision was automatically updated to reflect the committed changes.