-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
Resize text on the map #1877
Resize text on the map #1877
Conversation
not entirely sure is it an improvement
to not be so impactful - I prefer to not scare away the reviewer
app/src/main/java/de/westnordost/streetcomplete/map/MapFragment.kt
Outdated
Show resolved
Hide resolved
Not wrong, but usually Java getters are written like fields in Kotlin:
resources.configuration.fontScale
Am 2. Juni 2020 03:25:20 MESZ schrieb Mateusz Konieczny <notifications@github.com>:
…
@matkoniecz commented on this pull request.
> @@ -193,7 +193,13 @@ open class MapFragment : Fragment(),
}
protected open suspend fun getSceneUpdates(): List<SceneUpdate> {
- return listOf(SceneUpdate("global.language",
Locale.getDefault().language))
+ val textScale = getResources().getConfiguration().fontScale;
No, without any protests. Is there anything wrong/imperfect here?
|
ENT8R streetcomplete/streetcomplete-mapstyle@5dcfd32#commitcomment-39604906 found a better solution - so it will be likely done by improving mapstyle (support for text scaling and scaling text) and once new version of mapstyle is merged then text scaling parameter will become available. EDIT: the solution proposed by ENT8R seems to not work, but maybe I tested it in a wrong way |
OK, waiting for @ENT8R to push to streetcomplete-mapstyle |
So, only update of the map style is missing, right? |
Yes, once map style is pulled in it should work (I can retest it again once that happens to avoid things like |
Ok merged it to master (the theme update) |
Retested, works, as far as I can see it can be merged. |
Good, thanks! |
This PR makes two things - text now gets larger as one zooms in, it is now also respecting device text size settings.
Both are inspired by #1872
I admit that text now gets much larger on high zoom and I would not be surprised if it something disliked by @westnordost - in such case I may either retweaked to be subtler or entire "zoom in increases text" may be dropped (this mechanic is not a very noticeable but it actually appears in MAPS.ME, Google Maps, mapy.cz etc, so it is not something really weird).
Sadly, I found no way to just pass scaling factor into map style (as say
global.text_size_scaling
) and do everything else there.I tried things like that in map style itself and all of them failed - maybe I am missing something but it seems that it needs to be done outside map style file.
In case of this passing I will open PR against map style repo to add note about
text_size
andlanguage
getting overwritten by SC.My work on review that resulted in this pull request was sponsored by a NGI Zero Discovery grant