Some KCM use GridViewKCM as root item, and they may have extra items appended in the footer. Setting 'enabled: false' property of the root item, will disable the whole page, including the header and footer as well. This patch allow to enable/disable only the GridView.
Details
Diff Detail
- Repository
- R296 KDeclarative
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 19142 Build 19160: arc lint + arc unit
Can't you do view.enabled: false?
Edit: Never mind, view is bound to scroll.view, not scroll
Throwing out an alternative suggestion
readonly property alias gridContainer: scroll
(and then your code calling gridContainer.enabled = whatever)
It's more generic for any future stuff, and it solves the issue of trying to convey the difference between "view.enabled" and "viewEnabled"
I has the downside of throwing any possibility of encapsulation through the window though... Your call I'd say but that's something to keep in mind.
Alternatively we could fix the scroll view container taking into account the scroll enabled, so that view.enabled does the right thing
Yeah, but we clearly have at least one reason to break the encapsulation.
I can imagine a need to externally force scroll position.
I'm not forcing my version either, just wanted it considered
@notmart I think you have final call?
Alternatively we could fix the scroll view container taking into account the scroll enabled, so that view.enabled does the right thing
enabled is transitive, so having a parent depend on a child would be a loop.
You mean the other way around right? Like in scroll enabled would be bound to view.enabled? I think I like that in fact, would make the API clearer.
now Kirigami.WheelHandler doesn't scroll disabled views anymore.
This may be enough to not require this (just view.enabled: false), perhaps scrollbars and background could update their look as well on the style side.