Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/src/main/java/com/osfans/trime/ime/core/BaseInputView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.osfans.trime.ime.keyboard.InputFeedbackManager
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import splitties.dimensions.dp
import splitties.views.dsl.core.withTheme
import kotlin.math.max

abstract class BaseInputView(
Expand Down Expand Up @@ -60,6 +61,8 @@ abstract class BaseInputView(
}
}

val themedContext = context.withTheme(android.R.style.Theme_DeviceDefault_Settings)

Comment thread
WhiredPlanck marked this conversation as resolved.
private var candidateActionMenu: PopupMenu? = null

fun showCandidateActionMenu(idx: Int, text: String, view: View, global: Boolean) {
Expand All @@ -74,7 +77,7 @@ abstract class BaseInputView(
service.lifecycleScope.launch {
InputFeedbackManager.keyPressVibrate(view, longPress = true)
candidateActionMenu =
PopupMenu(context, view).apply {
PopupMenu(themedContext, view).apply {
menu.add(title).apply {
isEnabled = false
}
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/osfans/trime/ime/core/InputView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import splitties.views.dsl.core.add
import splitties.views.dsl.core.imageView
import splitties.views.dsl.core.matchParent
import splitties.views.dsl.core.view
import splitties.views.dsl.core.withTheme
import splitties.views.dsl.core.wrapContent
import splitties.views.imageDrawable

Expand Down Expand Up @@ -90,7 +89,6 @@ class InputView(

private val updateWindowViewHeightJob: Job

private val themedContext = context.withTheme(android.R.style.Theme_DeviceDefault_Settings)
private val inputDepMgr = InputDependencyManager.initialize(this, themedContext, theme, service, rime)
private val di = inputDepMgr.di
private val broadcaster: InputBroadcaster by di.instance()
Expand All @@ -102,7 +100,6 @@ class InputView(
private val keyboardWindow: KeyboardWindow by di.instance()
private val liquidWindow: LiquidWindow by di.instance()

private val inlinePreeditMode by AppPrefs.defaultInstance().general.inlinePreeditMode
private val candidatesMode by AppPrefs.defaultInstance().candidates.mode

private val keyboardSidePadding = theme.generalStyle.keyboardPadding
Expand Down
Loading