the base C++ class for qml-based kcms is already there,
KQuickAddons::ConfigModule, so this is the right place
for the module. the import existed already: org.kde.kcm
the qml files gets added in the version 1.1 of the import
Details
- Reviewers
hein davidedmundson - Group Reviewers
Plasma - Commits
- R296:09ad7c2e2dad: Qml controls for kcm creation
ported the mouse cursors kcm to this
Diff Detail
- Repository
- R296 KDeclarative
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml | ||
---|---|---|
131 | Do these numbers align with anything? Then a comment pointing at where else we use them would be good. Or maybe use multiples of long/short duration? Or makes no sense? Same question about the other site in the code. | |
src/qmlcontrols/kcmcontrols/qml/GridView.qml | ||
31 | Is this still the best we can do? The FV code uses some old QQC1 private APIs to get scrollbar width. I thought in QQC2 we have proper ways to do it by accessing the SB instance? | |
src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml | ||
30 | When I wrote my launch feedback port I had some trouble with sizing in kcmshell5. The window came up too small to fit the FormLayout, but the scrollbar was also assuming a content size far larger than the FormLayout - I had to make the window pretty big for the vertical scrollbar to disappear. So it was broken in two ways. How does this compare? I noticed the hard-coded values here instead of really working with the content. | |
src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml | ||
28 | Same wonderings @ sizing. |
src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml | ||
---|---|---|
131 | ah, no there isn't anywhere anything configured for duration for tooltips. in upstream qqc2 is also one second hardcoded | |
src/qmlcontrols/kcmcontrols/qml/GridView.qml | ||
31 | qqc2 scrollview is almost api-less but maybe i can access somehow the scrollbar with an attached property now that i think about, i'll give a try | |
src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml | ||
30 | this one is a big scrollview of thumbnails and nothing else... | |
src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml | ||
28 | for this i think we could try to get an implicit size of the layout inside the main scrollview, but then limiting it to some hardcoded value anyways. |
- use the actual scrollbar width
- more sophisticated implicit size for kcms
- size hints for the simple kcm
I like the GridView
Note that we'll want to use that from the WallpaperDialog in Plasma, which isn't a KCM. I don't think it will be a problem though ?
We are missing docs everywhere. Every public type and property should have some.
Also please check the years in your copyright.
src/qmlcontrols/kcmcontrols/qml/GridView.qml | ||
---|---|---|
25 | How do you use this and set the model & delegate? | |
src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml | ||
24 | System settings adds it too for the KCM So isn't this adding a QtQuick scrollarea within a parent widget scrollarea? |
yes, those components should be usable from anywhere, so should be fine for the wallpaper dialog.
the only caveat is the dependency, (plasma-desktop already depends from kdeclarative so is fine)
src/qmlcontrols/kcmcontrols/qml/GridView.qml | ||
---|---|---|
25 | GridView { view.model: foo view.Delegate: Delegate {...} } | |
src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml | ||
24 | yeah, it does that.. |
src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml | ||
---|---|---|
24 |
Why? |
src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml | ||
---|---|---|
24 | 3 reasons:
the design for a pure qml version would be kcms to be kirigami Pages, which get directly inserted in a kirigami PageRow, so they manage their own scrolling
|