-
Notifications
You must be signed in to change notification settings - Fork 70
Replace pixel size of fonts with point sizes #1848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is how it looks like now: Thoughts:
|
@wonder-sk thanks for such tests! I have applied the scale |
@wonder-sk tested it on two additional devices, it seems to be small on them (I can now see 5 icons in the main toolbar on map, previously there were only 4). We need to find a way to scale it appropriately based on device's resolution
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now! 🎉
With high DPI scaling enabled, on some devices, the devicePixelRatio() is a bit off from the real ratio that we used to calculate ourselves (= DPI / 160) where 160 dpi is considered the "standard" dpi on Android. While on many phones/tablets this difference would be small (e.g. 0-3%), on some devices this discrepancy was larger according to our previous calculations (e.g. Huawei P30 has devicePixelRatio() = 3 while with 422 DPI it is ~2.6375 which means ~14% difference). The discrepancy means that the whole GUI was suddenly larger than it used to be, wasting space. So we keep using __dp to adjust scaling for these cases - under normal circumstances __dp should be 1 or somewhere near one - in the example of Huawei P30 __dp is ~0.8774 ( = 2.6375 / 3) In addition, record button has been replaced by SVG and few other minor GUI updates. Fixes #1833
Initial implementation of long range stake-out navigation between user position and a point feature. All commits: * initial implementation * add docs * try fix * navigation UI fixes * fix recenter icon * fix map click behaviour * address reviews * refactoring * fix memory leak * update qtquick libs versions * add navigation highlight * fix * remove unnecessary change * small typo * fix gps position update * fix #1824 crash on 32b start * Translate /app/i18n/input_en.ts in nl translation completed for the source file '/app/i18n/input_en.ts' on the 'nl' language. * add shared libraries after unwind as per docs * Translate /app/i18n/input_en.ts in es at least 75% translated for the source file '/app/i18n/input_en.ts' on the 'es' language. Manual sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * Translate /app/i18n/input_en.ts in es translation completed for the source file '/app/i18n/input_en.ts' on the 'es' language. * Translate /app/i18n/input_en.ts in ca translated for the source file '/app/i18n/input_en.ts' on the 'ca' language. * Translate /app/i18n/input_en.ts in hr_HR translation completed for the source file '/app/i18n/input_en.ts' on the 'hr_HR' language. * Fix large GUI elements on some devices (#1848) With high DPI scaling enabled, on some devices, the devicePixelRatio() is a bit off from the real ratio that we used to calculate ourselves (= DPI / 160) where 160 dpi is considered the "standard" dpi on Android. While on many phones/tablets this difference would be small (e.g. 0-3%), on some devices this discrepancy was larger according to our previous calculations (e.g. Huawei P30 has devicePixelRatio() = 3 while with 422 DPI it is ~2.6375 which means ~14% difference). The discrepancy means that the whole GUI was suddenly larger than it used to be, wasting space. So we keep using __dp to adjust scaling for these cases - under normal circumstances __dp should be 1 or somewhere near one - in the example of Huawei P30 __dp is ~0.8774 ( = 2.6375 / 3) In addition, record button has been replaced by SVG and few other minor GUI updates. Fixes #1833 * update strings * release translations * Translate /app/i18n/input_en.ts in fi translation completed for the source file '/app/i18n/input_en.ts' on the 'fi' language. * Translate /app/i18n/input_en.ts in he translation completed for the source file '/app/i18n/input_en.ts' on the 'he' language. * Translate /app/i18n/input_en.ts in ca translation completed for the source file '/app/i18n/input_en.ts' on the 'ca' language. * set up concurrency between workflow runs * test CI cancellation * fix copypaste error * change test file in copy-to-qgis script * update app version to 1.2.1 * fix versions update script for Android fix release * Translate /app/i18n/input_en.ts in ja_JP translation completed for the source file '/app/i18n/input_en.ts' on the 'ja_JP' language. * release translated languages * add docs from qgis * update of qgis 3.22 version * Translate /app/i18n/input_en.ts in hr_HR translation completed for the source file '/app/i18n/input_en.ts' on the 'hr_HR' language. * remove unused highlightsgnode class * fix wrong rebase * === instad of == Co-authored-by: Tomas Mizera <tomas.mizera@lutraconsulting.co.uk> * update QtQuick version Co-authored-by: Tomas Mizera <tomas.mizera@lutraconsulting.co.uk> * address reviews * reduce navigation highlight complexity * fix c++ layout * CACHE_VERSION : 1 * fix extent and start point * remove closing the navigation when map is clicked * close navigation properly when drawer is closed * use different icon for recenter operation * remove debug prints * move the accuracy button above the panels when necessary * add some unit tests * fix c++ layout * try to fix build * disable follow GPS when in navigation * change CACHE_VERSION to 2 * fix 2, 3 & 5 * fix cpp layout * fix 7: recenter on close * invalidate qt cache * add cache to macos CI build * fix crash on multipoint layers - issue 4 * try fix test * add small border around navigation line - fixes 6 * show message when location is unavailable in navigation - 8 * add isPointLayerFeature test * fix accuracy button height offset * fix unresponsive map canvas after calling endNavigation * address Tomas comments Co-authored-by: PeterPetrik <zilolv@gmail.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Tomas Mizera <tomas.mizera@lutraconsulting.co.uk>
PR replaces use of pixels in font sizes with points.
Video from my Android:
(DPR: 2.625)
MNML-December13-010028PM.mp4
@wonder-sk I think we will need to higher the font size in the entire application, however, could you please try to run on your device first and see if it helps with #1833 ?
Resolves #1833