Icon width is inconsistent when height is specified
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
Low
|
Zoltan Balogh | ||
| | ubuntu-ui-toolkit (Ubuntu) |
Low
|
Zsombor Egri | ||
Bug Description
The width of an Icon {} depends if the Icon is an SVG coming from image://theme/ or a JPG.
For the SVG the width grows as the units.gu grow, but for the JPEG it does not and one has to manually add code to maitain the aspect ratio.
See the attached code and files.
Related branches
- Michał Sawicz: Disapprove on 2016-04-29
- ubuntu-sdk-build-bot: Approve (continuous-integration) on 2016-04-27
-
Diff: 280 lines (+77/-66)3 files modifiedsrc/Ubuntu/Components/plugin/unitythemeiconprovider.cpp (+61/-51)
src/Ubuntu/Components/plugin/unitythemeiconprovider.h (+1/-1)
tests/unit_x11/tst_iconprovider/tst_iconprovider.cpp (+15/-14)
- Tim Peeters: Approve on 2016-05-02
- PS Jenkins bot: Needs Fixing (continuous-integration) on 2016-04-22
-
Diff: 316 lines (+96/-66)4 files modifiedsrc/Ubuntu/Components/plugin/unitythemeiconprovider.cpp (+61/-51)
src/Ubuntu/Components/plugin/unitythemeiconprovider.h (+1/-1)
tests/unit_x11/tst_components/tst_icon.qml (+19/-0)
tests/unit_x11/tst_iconprovider/tst_iconprovider.cpp (+15/-14)
- ubuntu-sdk-build-bot: Approve (continuous-integration) on 2016-05-02
- Tim Peeters: Approve on 2016-05-02
-
Diff: 318 lines (+96/-66)4 files modifiedsrc/Ubuntu/Components/plugin/unitythemeiconprovider.cpp (+61/-51)
src/Ubuntu/Components/plugin/unitythemeiconprovider.h (+1/-1)
tests/unit_x11/tst_components/tst_icon.qml (+19/-0)
tests/unit_x11/tst_iconprovider/tst_iconprovider.cpp (+15/-14)
| Albert Astals Cid (aacid) wrote : | #2 |
| Albert Astals Cid (aacid) wrote : | #3 |
| Albert Astals Cid (aacid) wrote : | #5 |
No, I haven't
just run the file with different pixel per grid unit and see how the error is still there.
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| status: | Incomplete → New |
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| importance: | Undecided → Low |
| status: | New → Triaged |
| Zsombor Egri (zsombi) wrote : | #6 |
Ahm, Albert, I have worst news for you: design said we have to set the implicit width/height to 2grid units... so you will have to do more calculations if we apply that :(
Perhaps we expose the image size so you can decide whether you want to bind to that or not.
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| status: | Triaged → Fix Committed |
| status: | Fix Committed → Fix Released |
| description: | updated |
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| status: | Fix Released → Triaged |
| Changed in canonical-devices-system-image: | |
| status: | New → Fix Committed |
| importance: | Undecided → Low |
| milestone: | none → 12 |
| Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package ubuntu-ui-toolkit - 1.3.1984+
---------------
ubuntu-ui-toolkit (1.3.1984+
[ Christian Dywan ]
* Slimmer frame for TextFields: 0.5dp. Fixes LP: #1578190.
[ Albert Astals Cid ]
* Add override
The override specifier (since C++11) specifies that a virtual function
overrides another virtual function. In a member function declaration or
definition, override ensures that the function is virtual and is overriding
a virtual function from the base class.
[ Tim Peeters ]
* Fix reference error in PullToRefreshStyle. Fixes LP: #1582843
* Mark Tab, Tabs, TabBar, PageHeadConfigu
PageHeadState, ToolbarButton, ToolbarItems as deprecated in the
documentation. Fixes LP: #1566735, LP: #1566741.
[ CI Train Bot ]
* Resync trunk.
-- Zoltan Balogh <email address hidden> Fri, 27 May 2016 07:08:44 +0000
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| status: | Triaged → Fix Released |
| Albert Astals Cid (aacid) wrote : | #8 |
As discussed in IRC a while back, this bug hsan't really been fixed.
| Changed in canonical-devices-system-image: | |
| status: | Fix Committed → Confirmed |
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| status: | Fix Released → Confirmed |
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → Zoltan Balogh (bzoltan) |
| milestone: | 12 → backlog |
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| assignee: | nobody → Zsombor Egri (zsombi) |


Albert, haven't you provided recently a fix for this?