Skip to content

Commit

Permalink
fix: add missing highlighted candidate background
Browse files Browse the repository at this point in the history
Close #1456.
  • Loading branch information
WhiredPlanck committed Dec 24, 2024
1 parent 40b8fb5 commit 9807916
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class CandidateItemUi(
private val maybeCommentTextColor = ColorManager.getColor("comment_text_color")
private val maybeHighlightedCandidateTextColor = ColorManager.getColor("hilited_candidate_text_color")
private val maybeHighlightedCommentTextColor = ColorManager.getColor("hilited_comment_text_color")
private val maybeHighlightedCandidateBackColor = ColorManager.getColor("hilited_candidate_back_color")

val label =
textView {
Expand All @@ -58,7 +59,6 @@ class CandidateItemUi(

override val root =
constraintLayout {
background = ColorManager.getColor("hilited_candidate_back_color")?.let { pressHighlightDrawable(it) }
if (theme.generalStyle.commentOnTop) {
add(
altLabel,
Expand Down Expand Up @@ -102,9 +102,11 @@ class CandidateItemUi(
if (yes) {
maybeHighlightedCandidateTextColor?.let { label.setTextColor(it) }
maybeHighlightedCommentTextColor?.let { altLabel.setTextColor(it) }
maybeHighlightedCandidateBackColor?.let { root.setBackgroundColor(it) }
} else {
maybeCandidateTextColor?.let { label.setTextColor(it) }
maybeCommentTextColor?.let { altLabel.setTextColor(it) }
maybeHighlightedCandidateBackColor?.let { root.background = pressHighlightDrawable(it) }
}
}
}

0 comments on commit 9807916

Please sign in to comment.