Density scaling may lead to inconsistent icon and keyboard size #813
Labels
bug
Something isn't working
low priority
This issue is unlikely to be resolved in the near future due to maintainers' priorities
Describe the bug
Icons on keys, and the background of the action key in material and rounded themes (when key borders are disabled) change size with screen dpi (smallest width setting,
DisplayMetrics.density
). Also preview popups do this, see #712.This is inconsistent with the rest of the keyboard, which has constant size when changing smallest width. Usually it's not a problem, but may look weird for very low or very high density.
It appears there already is a limit for icon scaling: with 400dp and 500dp, icons have the same size, while with 320dp they are larger.
Action key background size is different for all 3 of the tested settings. At 320dp it appears to be large enough to increase action key size, which in turn increases keyboard height.
A first attempt to fix it by rescaling icons with
needsToKeepBackgroundAspectRatio
inKeyboardView.onDrawKeyBackground
did not work out as expected.If a simple(!) solution is found, it should also be applied to fix #712.
App version
All, at least up to 2.0-alpha1
Device:
This is mostly an issue across devices, as changing dpi on a device (via smallest width setting) is rarely done.
The text was updated successfully, but these errors were encountered: