mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix landscape floating keyboard going offscreen on the right
This commit is contained in:
parent
1c9c94b83d
commit
28f3c07d5f
@ -490,6 +490,7 @@ class LatinIME : InputMethodServiceCompose(), LatinIMELegacy.SuggestionStripCont
|
||||
|
||||
fun getInputViewHeight(): Int = inputViewHeight
|
||||
fun getViewHeight(): Int = composeView?.height ?: resources.displayMetrics.heightPixels
|
||||
fun getViewWidth(): Int = composeView?.width ?: resources.displayMetrics.widthPixels
|
||||
|
||||
private var isInputModal = false
|
||||
fun setInputModal(to: Boolean) {
|
||||
|
@ -709,7 +709,7 @@ class UixManager(private val latinIME: LatinIME) {
|
||||
newOffset.y.coerceAtLeast(0.0f)
|
||||
)
|
||||
newOffset = newOffset.copy(
|
||||
newOffset.x.coerceAtMost(configuration.screenWidthDp.dp.toPx() - size.width),
|
||||
newOffset.x.coerceAtMost(latinIME.getViewWidth().toFloat() - size.width),
|
||||
newOffset.y.coerceAtMost(latinIME.getViewHeight().toFloat() - measuredTouchableHeight)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user