Skip to content

Commit 9807916

Browse files
committed
fix: add missing highlighted candidate background
Close #1456.
1 parent 40b8fb5 commit 9807916

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/com/osfans/trime/ime/candidates/CandidateItemUi.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class CandidateItemUi(
3535
private val maybeCommentTextColor = ColorManager.getColor("comment_text_color")
3636
private val maybeHighlightedCandidateTextColor = ColorManager.getColor("hilited_candidate_text_color")
3737
private val maybeHighlightedCommentTextColor = ColorManager.getColor("hilited_comment_text_color")
38+
private val maybeHighlightedCandidateBackColor = ColorManager.getColor("hilited_candidate_back_color")
3839

3940
val label =
4041
textView {
@@ -58,7 +59,6 @@ class CandidateItemUi(
5859

5960
override val root =
6061
constraintLayout {
61-
background = ColorManager.getColor("hilited_candidate_back_color")?.let { pressHighlightDrawable(it) }
6262
if (theme.generalStyle.commentOnTop) {
6363
add(
6464
altLabel,
@@ -102,9 +102,11 @@ class CandidateItemUi(
102102
if (yes) {
103103
maybeHighlightedCandidateTextColor?.let { label.setTextColor(it) }
104104
maybeHighlightedCommentTextColor?.let { altLabel.setTextColor(it) }
105+
maybeHighlightedCandidateBackColor?.let { root.setBackgroundColor(it) }
105106
} else {
106107
maybeCandidateTextColor?.let { label.setTextColor(it) }
107108
maybeCommentTextColor?.let { altLabel.setTextColor(it) }
109+
maybeHighlightedCandidateBackColor?.let { root.background = pressHighlightDrawable(it) }
108110
}
109111
}
110112
}

0 commit comments

Comments
 (0)