From bf25a44f7b751208c4a2279d2f2109a5440fc497 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 16 Jun 2021 11:21:58 +1000 Subject: [PATCH] Minor tweaks --- .../securesms/conversation/v2/input_bar/InputBarButton.kt | 3 ++- .../conversation/v2/messages/VisibleMessageContentView.kt | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/input_bar/InputBarButton.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/input_bar/InputBarButton.kt index f736066cd6..a9f4732543 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/input_bar/InputBarButton.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/input_bar/InputBarButton.kt @@ -48,7 +48,8 @@ class InputBarButton : RelativeLayout { result.layoutParams = LayoutParams(size, size) result.scaleType = ImageView.ScaleType.CENTER_INSIDE result.setImageResource(iconID) - result.imageTintList = ColorStateList.valueOf(resources.getColorWithID(R.color.text, context.theme)) + val colorID = if (isSendButton) R.color.black else R.color.text + result.imageTintList = ColorStateList.valueOf(resources.getColorWithID(colorID, context.theme)) result } diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt index ac0fd77b26..05edec29b7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt @@ -21,6 +21,7 @@ import org.thoughtcrime.securesms.database.model.MmsMessageRecord import org.thoughtcrime.securesms.loki.utilities.UiMode import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities import org.thoughtcrime.securesms.loki.utilities.getColorWithID +import org.thoughtcrime.securesms.loki.utilities.toPx import java.lang.IllegalStateException class VisibleMessageContentView : LinearLayout { @@ -103,7 +104,9 @@ class VisibleMessageContentView : LinearLayout { // region Convenience private fun getBodyTextView(message: MessageRecord): TextView { val result = TextView(context) - result.setPadding(resources.getDimension(R.dimen.small_spacing).toInt()) + val vPadding = resources.getDimension(R.dimen.small_spacing).toInt() + val hPadding = toPx(12, resources) + result.setPadding(hPadding, vPadding, hPadding, vPadding) result.text = message.body result.setTextSize(TypedValue.COMPLEX_UNIT_PX, resources.getDimension(R.dimen.medium_font_size)) val uiMode = UiModeUtilities.getUserSelectedUiMode(context)