@@ -16,7 +16,6 @@ import com.osfans.trime.data.theme.Theme
1616import com.osfans.trime.ime.core.AutoScaleTextView
1717import com.osfans.trime.ime.keyboard.GestureFrame
1818import com.osfans.trime.util.pressHighlightDrawable
19- import splitties.dimensions.dp
2019import splitties.views.dsl.constraintlayout.baselineToBaselineOf
2120import splitties.views.dsl.constraintlayout.centerHorizontally
2221import splitties.views.dsl.constraintlayout.centerInParent
@@ -35,12 +34,10 @@ import splitties.views.dsl.core.matchParent
3534import splitties.views.dsl.core.view
3635import splitties.views.dsl.core.wrapContent
3736import splitties.views.gravityCenter
38- import splitties.views.horizontalPadding
39- import timber.log.Timber
4037
4138class CandidateItemUi (
4239 override val ctx : Context ,
43- theme : Theme ,
40+ private val theme : Theme ,
4441) : Ui {
4542 private val textSize = theme.generalStyle.candidateTextSize
4643 private val commentSize = theme.generalStyle.commentTextSize
@@ -133,7 +130,7 @@ class CandidateItemUi(
133130 val cColor = if (isHighlighted) hlCommentColor else commentColor
134131 text.text = item.text
135132 text.setTextColor(tColor)
136- comment.text = item.comment
133+ comment.text = if (theme.generalStyle.commentOnTop) item.comment else " ${item.comment} "
137134 comment.setTextColor(cColor)
138135 comment.isGone = item.comment.isEmpty()
139136 root.background =
0 commit comments