[SailfishDevel] The UI dims after removing an item from GridView
Marcin Mielniczuk
marmistrzmar at gmail.com
Tue Aug 2 16:44:47 UTC 2016
Hi,
This happens even if deleting the item is the first thing I do. The
model hasn't changed between the two calls.
But this doesn't happen if I use a RemorseItem.
Marcin
On 02.08.2016 17:54, Michael Fuchs wrote:
> 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
>>
> _______________________________________________
> 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