8000 Replace pixel size of fonts with point sizes by tomasMizera · Pull Request #1848 · MerginMaps/mobile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 13 commits into from
Dec 15, 2021
Merged

Conversation

tomasMizera
Copy link
Collaborator

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

@wonder-sk
Copy link
Contributor
wonder-sk commented Dec 13, 2021

This is how it looks like now:

Thoughts:

  • fonts
    • "normal" font size is now roughly the same as it used to be (~34px old/new)
    • "small" font size is now a bit small - I suggest increasing 12 -> 12.5 (it should not be a problem to have point sizes as real numbers)
    • "title" / "big" font size looks fine
    • we can probably finally get rid of "rado2lutra" scale factor :-)
  • all the element sizes are still increased - e.g. those based on InputStyle.rowHeight
    • height of an item in project list: old ~200 px vs new ~228 px
    • height of page title or search bar: old ~169 px vs new ~192 px
    • looks like if we divide all the constant sizes by ~1.14, we could get to the original sizing

@tomasMizera
Copy link
Collaborator Author

@wonder-sk thanks for such tests! I have applied the scale

@tomasMizera tomasMizera marked this pull request as ready for review December 13, 2021 16:28
@wonder-sk
Copy link
Contributor

Great, thanks for the updates! Now it looks roughly the same as it used to in terms of fonts and element sizing...

To be checked on other devices...

On my phone:

new3

@wonder-sk
Copy link
Contributor

One more thing that caught my eye is that the record button's "donut" icon has very small hole in the donut now :-)
(not sure why the icon is "dynamic" like that - we should be using SVGs for icons)

Screenshot_20211213_210816

@tomasMizera
Copy link
Collaborator Author

@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

iPhone 11 Samsung Galaxy A32
RPReplay_Final1639468748.mov
MNML-December14-090514AM.mp4

@tomasMizera
Copy link
Collaborator Author

From my tests, feature form editor labels are bigger now, however previously I think they were too small on Android

Copy link
Contributor
@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now! 🎉

@wonder-sk wonder-sk merged commit 0dabd4c into master Dec 15, 2021
@PeterPetrik PeterPetrik deleted the 1833-large-fonts branch December 16, 2021 07:03
NEDJIMAbelgacem pushed a commit that referenced this pull request Dec 22, 2021
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
tomasMizera added a commit that referenced this pull request Jan 11, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Large fonts and GUI elements
4 participants
0