font.pointSize should not be used together with units.gu()
Bug #1288819 reported by
Michael Zanetti
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Weather App |
Fix Released
|
Medium
|
Martin Borho |
Bug Description
This is how the weather app looks like on my Retina screen with GRID_UNIT_PX=18:
http://
I think the issue is that you're using font.pointSize in conjunction with units.gu(). Units.gu() converts grid units into pixels, while font points are translated, taking fonts DPI into account. This means you should
* either use font.pointSize with a hardcoded value (not so good on Ubuntu, but ok for generic QML)
* or use font.pixelSize with units.gu() (acceptable for Ubuntu, but also not really way to go)
* or replace the Text {} item with the Label {} from uitk and set the font to "small", "large" or whatever (suggested solution for Ubuntu)
Related branches
lp:~martin-borho/ubuntu-weather-app/fix-1288819
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
- Alan Pope 🍺🐧🐱 🦄 (community): Approve
- Mihir Soni (community): Approve
-
Diff: 322 lines (+45/-157)3 files modifiedcomponents/WeatherDetailComponent.qml (+37/-29)
components/WeatherTemperatureComponent.qml (+6/-126)
tests/autopilot/ubuntu_weather_app/tests/test_settings.py (+2/-2)
description: | updated |
Changed in ubuntu-weather-app: | |
assignee: | nobody → Raúl Yeguas (neokore) |
Changed in ubuntu-weather-app: | |
assignee: | Raúl Yeguas (neokore) → Martin Borho (martin-borho) |
status: | New → Confirmed |
importance: | Undecided → Medium |
status: | Confirmed → In Progress |
Changed in ubuntu-weather-app: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Using Label and fontSize is ok for normal text , like the labels in the shapes at the bottom and the top.
But the font with Label and fontSize "x-large" for temperature/metric values in the center of the shapes is too small.
What way would you suggest to get a really large font? (Like the temperatures/values in the shapes)