Icon creates binding loop on implicitWidth and implicitHeight when used with QT_DEVICE_PIXEL_RATIO

Bug #1561654 reported by Andrea Bernabei
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Ubuntu UI Toolkit r1905

Description:
Using Icon without specifying an explicit size causes binding loops on implicitWidth (and also implicitHeight)

How to reproduce:

test case: QT_DEVICE_PIXEL_RATIO=2 qmlscene main.qml

where main.qml is:

import QtQuick 2.4
import Ubuntu.Components 1.3

MainView {
    id: gallery
    Icon {
        name: "add"
    }
}

Andrea Bernabei (faenil)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → High
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Peeters (tpeeters) wrote :

See if https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1553090 can be related, even though the Icon does not have a sensing area.

Revision history for this message
Michael Zanetti (mzanetti) wrote : Re: Icon creates binding loop on implicitWidth and implicitHeight

This does not only happen when using DEVICE_PIXEL_RATIO. Adjusted title.

summary: - Icon creates binding loop on implicitWidth and implicitHeight when used
- with QT_DEVICE_PIXEL_RATIO
+ Icon creates binding loop on implicitWidth and implicitHeight
Revision history for this message
Andrea Bernabei (faenil) wrote :

@Michael: does the testcase trigger a binding loop on your setup without specifying QT_DEVICE_PIXEL_RATIO?

I only get the binding loop warning when QT_DEVICE_PIXEL_RATIO is set, I don't get it when it's not.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

yeah, I see that in like all of my apps where I haven't explicitly worked around it.

Revision history for this message
Andrea Bernabei (faenil) wrote :

Please try with the testcase, if that doesn't trigger it then the bug title needs adding QT_DEVICE_PIXEL_RATIO back, or you have to add another testcase that triggers it without QT_DEVICE_PIXEL_RATIO

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Added a test case that prints the warning without QT_DEVICE_PIXEL_RATIO into the description

description: updated
description: updated
Revision history for this message
Michael Zanetti (mzanetti) wrote :

ok. I totally stand corrected... turns out, the apps I start on my laptop actually all have QT_DEVICE_PIXEL_RATIO set to 2 implicitly through QtCreator which is why I see this issue all the time. I'm so sorry for the noise. I'll revert all my changes to this bug.

In any case, we'll soon be enabling the use of QT_DEVICE_PIXEL_RATIO on the phones too so this is quite important nevertheless.

summary: - Icon creates binding loop on implicitWidth and implicitHeight
+ Icon creates binding loop on implicitWidth and implicitHeight when used
+ with QT_DEVICE_PIXEL_RATIO
description: updated
Revision history for this message
Gerry Boland (gerboland) wrote :

I've attached a branch I worked on for dynamic grid unit support. This rewrites the icon image loader to follow the exact behaviour of qt's image loader, and solved my icon sizing/blur issue. It needs tests though

Revision history for this message
Tim Peeters (tpeeters) wrote :
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: Tim Peeters (tpeeters) → Lukáš Tinkl (lukas-kde)
Revision history for this message
Tim Peeters (tpeeters) wrote :

Re-assigning to Lukas since he was already working on it.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → New
assignee: Lukáš Tinkl (lukas-kde) → nobody
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.