Skip to content

Commit 560658f

Browse files
shitlimegoofyz
authored andcommitted
feat: fixed key bar support image key_back_color
1 parent a1e616d commit 560658f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/src/main/java/com/osfans/trime/ime/symbol/LiquidLayout.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package com.osfans.trime.ime.symbol
66

77
import android.annotation.SuppressLint
88
import android.content.Context
9-
import android.graphics.drawable.GradientDrawable
109
import androidx.constraintlayout.widget.ConstraintLayout
1110
import androidx.core.view.setPadding
1211
import com.osfans.trime.data.theme.ColorManager
@@ -66,12 +65,13 @@ class LiquidLayout(context: Context, service: TrimeInputMethodService, theme: Th
6665
val root =
6766
frameLayout {
6867
background =
69-
GradientDrawable().apply {
70-
cornerRadius = theme.generalStyle.roundCorner.toFloat()
71-
ColorManager.getColor("key_back_color")?.let { bg ->
72-
setColor(bg)
73-
}
74-
}
68+
ColorManager.getDrawable(
69+
context,
70+
key = "key_back_color",
71+
border = theme.generalStyle.keyBorder,
72+
borderColorKey = "key_border_color",
73+
roundCorner = theme.generalStyle.roundCorner,
74+
)
7575
add(
7676
text,
7777
lParams(matchParent, wrapContent) {

0 commit comments

Comments
 (0)