diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt
index 6d808c6b..d3b4948d 100644
--- a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt
+++ b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt
@@ -36,7 +36,10 @@ class ThemePrefs(sharedPreferences: SharedPreferences) :
val keyBorder = switch(R.string.key_border, "key_border", false)
- val keySolidBorder = switch(R.string.key_solid_border, "key_solid_border", false)
+ val keyBorderStroke = switch(
+ R.string.key_border_stroke, "key_border_stroke", false,
+ enableUiOn = { keyBorder.getValue() }
+ )
val keyRippleEffect = switch(R.string.key_ripple_effect, "key_ripple_effect", false)
diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt
index cf10fda2..7d8a3dde 100644
--- a/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt
+++ b/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt
@@ -55,8 +55,8 @@ abstract class KeyView(ctx: Context, val theme: Theme, val def: KeyDef.Appearanc
CustomGestureView(ctx) {
val bordered: Boolean
+ val borderStroke: Boolean
val rippled: Boolean
- val solidBordered: Boolean
val radius: Float
val hMargin: Int
val vMargin: Int
@@ -64,8 +64,8 @@ abstract class KeyView(ctx: Context, val theme: Theme, val def: KeyDef.Appearanc
init {
val prefs = ThemeManager.prefs
bordered = prefs.keyBorder.getValue()
+ borderStroke = prefs.keyBorderStroke.getValue()
rippled = prefs.keyRippleEffect.getValue()
- solidBordered = prefs.keySolidBorder.getValue()
radius = dp(prefs.keyRadius.getValue().toFloat())
val landscape = resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
val hMarginPref =
@@ -126,12 +126,13 @@ abstract class KeyView(ctx: Context, val theme: Theme, val def: KeyDef.Appearanc
}
val borderOrShadowWidth = dp(1)
// background: key border
- appearanceView.background = if (solidBordered) borderedKeyBackgroundDrawable(
+ appearanceView.background = if (borderStroke) borderedKeyBackgroundDrawable(
bkgColor, theme.keyShadowColor,
radius, borderOrShadowWidth, hMargin, vMargin
) else shadowedKeyBackgroundDrawable(
bkgColor, theme.keyShadowColor,
- radius, borderOrShadowWidth, hMargin, vMargin)
+ radius, borderOrShadowWidth, hMargin, vMargin
+ )
// foreground: press highlight or ripple
setupPressHighlight()
} else {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 00d1b5e9..ba4cc9ae 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -315,5 +315,5 @@
🏾 Type-5
🏿 Type-6
Hide unsupported Emojis
- Enable solid border instead of shadow
+ Enable stroke for key border