redically simplifying the code, port the ksplash kcm to the new design
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma VDG - Commits
- R119:a6761883c8e7: port the ksplash kcm to the new design
selecting and preview work correctly, resize behavior is correct
Diff Detail
- Repository
- R119 Plasma Desktop
- Branch
- phab/ksplashredesign
- Lint
No Linters Available - Unit
No Unit Test Coverage
kcms/ksplash/package/contents/ui/main.qml | ||
---|---|---|
61 | the onCountChanged connection thinghie it's an hack that serves at startup: we don't have a signal from listview "i'm done populating" which happens way after component.oncompleted, so the only way we have is when the list gets populated, which also means that its contents grow in size. *probably* i can remove onCurrentIndexChanged |
kcms/ksplash/package/contents/ui/main.qml | ||
---|---|---|
61 | You shouldn't have told me that :) I have one consistent rule about working round Qt bugs, it needs an upstream report and a link in the code. but in any case, your comment doesn't explain why we need: If we've just changed the index, we'll run onCurrentIndexChanged which does it's own view.positionViewAt() . Unless we need to position the view even when we don't change the index? |
kcms/ksplash/package/contents/ui/main.qml | ||
---|---|---|
61 |
I am not completely sure is actually a Qt bug... not sure it would be possible to have some finished signal, as depending on how the model behaves, you can never be sure that the representation is "completed" as the model can change at any moment? |
kcms/ksplash/package/contents/ui/main.qml | ||
---|---|---|
61 |
It must know internally as it has that separate populate and add transition. It shouldn't need an external signal. In a perfect world: ListView { model: someValidModel currentIndex: 4 } should "just work" |
kcms/ksplash/package/contents/ui/main.qml | ||
---|---|---|
61 | ListView { annoyingly, you are right :p now, loading the model in the ctor and just relying on one single binding for currentIndex works perfectly. note: i removed onCurrentIndexChanged: positionViewAtIndex as i want to put it on the gridview kcm component itself, as i think it belongs there. |
Is there a way that the additional buttons are centered along the bottom edge of the preview?
somethign something centre buttons
Alternative is to maximise the viewport. There was bug report on the cursors KCM about that, but I can't remember what happened.
If the buttons are bound to the edges of the chooser thingy, doesn't that make them jump around and have different positions when the window is horizontally resized? https://bugs.kde.org/show_bug.cgi?id=391910 strikes again...
this is an experiment (still full of binding loops) which implements the way we talked about of
- frame always 100% wide
- cells spacing flexible while resizing
> http://www.youtube.com/watch?v=bJjESzaUL48