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 getInputViewHeight(): Int = inputViewHeight
|
||||||
fun getViewHeight(): Int = composeView?.height ?: resources.displayMetrics.heightPixels
|
fun getViewHeight(): Int = composeView?.height ?: resources.displayMetrics.heightPixels
|
||||||
|
fun getViewWidth(): Int = composeView?.width ?: resources.displayMetrics.widthPixels
|
||||||
|
|
||||||
private var isInputModal = false
|
private var isInputModal = false
|
||||||
fun setInputModal(to: Boolean) {
|
fun setInputModal(to: Boolean) {
|
||||||
|
@ -709,7 +709,7 @@ class UixManager(private val latinIME: LatinIME) {
|
|||||||
newOffset.y.coerceAtLeast(0.0f)
|
newOffset.y.coerceAtLeast(0.0f)
|
||||||
)
|
)
|
||||||
newOffset = newOffset.copy(
|
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)
|
newOffset.y.coerceAtMost(latinIME.getViewHeight().toFloat() - measuredTouchableHeight)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user