0
0
mirror of https://github.com/florisboard/florisboard.git synced 2024-09-19 19:42:20 +02:00

Fix visual layout measurement bugs

This commit is contained in:
Patrick Goldinger 2020-04-24 19:10:33 +02:00
parent 6ca33b14f2
commit 95b81423cb
2 changed files with 2 additions and 3 deletions

View File

@ -154,7 +154,7 @@ class KeyView(
KeyCode.VIEW_SYMBOLS,
KeyCode.VIEW_SYMBOLS2,
KeyCode.DELETE,
KeyCode.ENTER -> (keyboardView.desiredKeyWidth * 1.75f).toInt()
KeyCode.ENTER -> (keyboardView.desiredKeyWidth * 1.56f).toInt()
else -> keyboardView.desiredKeyWidth
}
val desiredHeight = keyboardView.desiredKeyHeight

View File

@ -55,8 +55,7 @@ class KeyboardView(
val widthSize = MeasureSpec.getSize(widthMeasureSpec)
val keyMarginH = resources.getDimension((R.dimen.key_marginH)).toInt()
val keyRowMarginH = resources.getDimension((R.dimen.keyboard_row_marginH)).toInt()
desiredKeyWidth = ((widthSize - (2 * keyRowMarginH)) / 10) - (2 * keyMarginH)
desiredKeyWidth = (widthSize / 10) - (2 * keyMarginH)
val factor = florisboard.prefs!!.getString("keyboard__height_factor", "normal")
desiredKeyHeight = (resources.getDimension(R.dimen.key_height).toInt() * when (factor) {