[SailfishDevel] The UI dims after removing an item from GridView
Michael Fuchs
michfu at gmx.at
Tue Aug 2 15:54:36 UTC 2016
Hi,
did the model (MyModel) change during the first and the second time you
opened the context menu?
I had such issues, when this was the case.
regards, Michael.
Am 02.08.2016 um 16:42 schrieb Marcin Mielniczuk:
> Hi,
>
> I created a SilicaGridView with a ContextMenu (placed in a ColumnLayout):
>
> SilicaGridView {
> id: myView
>
> Layout.preferredWidth: parent.width
> Layout.fillHeight: true
>
> model: myModel
>
> cellWidth: width / gridDimension // say, gridDimension = 2
> cellHeight: height / gridDimension
>
> delegate: BackgroundItem {
>
> id: bgItem
> width: myView.cellWidth
> height: myView.cellHeight
>
> ContextMenu {
> id: contextMenu
> parent: bgItem
> anchors {
> left: bgItem.left
> right: bgItem.right
> bottom: bgItem.bottom
> }
>
> MenuItem {
> text: "Remove"
> onClicked: myModel.remove(model.index)
> }
> }
>
> onPressAndHold: contextMenu.show(this)
>
> VisualElement {
> /* ... */
> }
> }
> }
>
> Then I tried using it. I pressed and held the BackgroundItem. The menu
> appeared. I stopped pressing the mouse. The screen dimmed. I decided not
> to remove. The screen undimmed. I entered the menu again. The screen
> dimmed. I removed the element: the screen did *not* undim.
>
> What have I done wrong?
>
> --
> Marcin
>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
>
More information about the Devel
mailing list