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:
parent
6ca33b14f2
commit
95b81423cb
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user