[KCM] Rework design and structure
ClosedPublic

Authored by romangg on Feb 23 2017, 12:25 AM.

Details

Summary

This patch changes no functional stuff, only the arrangement and headings of the controls.

In the end the KCM:

  • wastes less space
  • resembles more the applet
  • is less cumbersome to use because we have only 3 tabs instead of 5 anymore
  • has a less complicated code structure

Screenshots:



This patch fixes the following three problems brought up in T5412:

  • On opening you are greeted with the Applications tab (which in most cases is empty). But what a user normally really want to see at first when he goes to the audio configuration in System Settings is a list of his audio devices and options to configure them.
  • Tab titles are shortened because they are too long and they are inconsistent ("Applications" vs "Recordi..").
  • That there are in both cases two different tabs for "Applications" and "Record..." as well as "Output Devices" and "Input Devices" seems unnecessary and the result is normally lots of unused space in the tabs.

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.
romangg created this revision.Feb 23 2017, 12:25 AM
drosca edited edge metadata.Feb 23 2017, 8:45 AM

I like it, looks much better! +1

Just a note, the tab titles were not elided because they were too long, but because of stupid Qt bug. You can try showing TabView with only one tab titled "Recording" and you'll see it is elided too, while much longer titles are not.

import QtQuick 2.2
import QtQuick.Controls 1.0

TabView { Tab { title: "Recording" } }

So it is now fixed for English, but may be broken in translations.

Thank you! This Qt bug seems kinda weird. Maybe we should move away from using Tabs here? I thought about this, but haven't quite found the way to go instead. Maybe the same nice looking buttons you use in the applet (with the blue line below)?

Anyway, this would be a new diff and the change for the category names make sense also without directly fixing this elide problem. So if you don't see any blatant bugs I would push this one now, ok?

drosca accepted this revision.Feb 23 2017, 11:05 AM

This Qt bug seems kinda weird.

Not really, just another QtQuickControls1 bug ...

Maybe we should move away from using Tabs here? I thought about this, but haven't quite found the way to go instead. Maybe the same nice looking buttons you use in the applet (with the blue line below)?

Then it will look out of place, all other KCMs use tabs. Also you can't use the tabbar from applet, as that is Plasma component (you can of course implement the same thing with QtQuickControls, but then again it will look out of place).

So if you don't see any blatant bugs I would push this one now, ok?

Yes, the code is fine.

This revision is now accepted and ready to land.Feb 23 2017, 11:05 AM

Then it will look out of place, all other KCMs use tabs. Also you can't use the tabbar from applet, as that is Plasma component (you can of course implement the same thing with QtQuickControls, but then again it will look out of place).

There will be a redesign of SySe and KCMs (T2026) some day... So we have some liberty to diverge from old KCMs. The idea is to use more Kirigami design patterns and throw the old desktop stuff away where it doesn't hurt the desktop user. But I'm not sure if we should use the the applet buttons here when applying Kirigami design patterns.

This revision was automatically updated to reflect the committed changes.

Sorry, I only noticed it now when I was trying to fix the binding loop.

src/kcm/package/contents/ui/Applications.qml
33

There is now binding loop because this binding (also for other tabs), which makes the content width wrong when switching tabs.

37

This is missing Layout.fillWidth

87

This doesn't have height, interactive, visible, spacing properties as other ListViews.