Fixing the translate icon tint, changing translate icon to fluent icon. Making it better overall

This commit is contained in:
LucasGGamerM 2022-12-18 14:09:21 -03:00
parent 0cafbe9f91
commit bfafac3d4f
9 changed files with 23 additions and 15 deletions

View File

@ -23,7 +23,6 @@ import org.joinmastodon.android.GlobalUserPreferences;
import org.joinmastodon.android.R;
import org.joinmastodon.android.api.requests.accounts.GetAccountRelationships;
import org.joinmastodon.android.api.requests.statuses.GetStatusSourceText;
import org.joinmastodon.android.api.requests.statuses.GetStatusTranslation;
import org.joinmastodon.android.api.session.AccountSessionManager;
import org.joinmastodon.android.fragments.BaseStatusListFragment;
import org.joinmastodon.android.fragments.ComposeFragment;
@ -34,7 +33,6 @@ import org.joinmastodon.android.model.Account;
import org.joinmastodon.android.model.Attachment;
import org.joinmastodon.android.model.Relationship;
import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.model.StatusTranslation;
import org.joinmastodon.android.ui.text.HtmlParser;
import org.joinmastodon.android.ui.utils.CustomEmojiHelper;
import org.joinmastodon.android.ui.utils.UiUtils;
@ -241,7 +239,8 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
}
}
if(item.hasTranslateToggle){
translate.setImageResource(item.status.wantsTranslation ? R.drawable.ic_translate_on : R.drawable.ic_translate_off);
translate.setImageResource(R.drawable.ic_translate);
translate.setSelected(item.status.wantsTranslation);
}
itemView.setPadding(itemView.getPaddingLeft(), itemView.getPaddingTop(), itemView.getPaddingRight(), item.needBottomPadding ? V.dp(16) : 0);
if(TextUtils.isEmpty(item.extraText)){

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:colorAccent" android:state_selected="true"/>
<item android:color="?android:textColorSecondary" android:state_enabled="true"/>
<item android:color="?colorSecondary"/>
</selector>

View File

@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M16.953 5.303c0.167-0.526-0.124-1.088-0.65-1.256-0.526-0.167-1.089 0.124-1.256 0.65-0.124 0.389-0.236 0.899-0.324 1.344-0.565 0.012-1.12 0-1.652-0.038-0.55-0.04-1.03 0.375-1.069 0.926-0.039 0.55 0.376 1.03 0.927 1.069 0.46 0.032 0.934 0.048 1.416 0.047-0.106 0.612-0.184 1.176-0.24 1.697-1.263 0.717-2.142 1.685-2.636 2.701-0.624 1.283-0.7 2.857 0.239 3.883 0.675 0.736 1.704 0.758 2.499 0.588 0.322-0.068 0.654-0.176 0.988-0.32 0.255 0.346 0.716 0.5 1.142 0.348 0.52-0.186 0.79-0.759 0.604-1.278L16.9 15.549c1.148-0.931 2.202-2.307 2.735-4.06 0.286 0.251 0.507 0.55 0.658 0.864 0.284 0.594 0.334 1.271 0.099 1.91-0.234 0.633-0.78 1.313-1.84 1.843-0.493 0.247-0.694 0.847-0.447 1.341 0.247 0.494 0.848 0.695 1.342 0.448 1.44-0.72 2.385-1.758 2.821-2.94 0.434-1.176 0.332-2.414-0.17-3.464-0.44-0.918-1.171-1.68-2.104-2.165C19.998 9.22 20 9.11 20 9c0-0.552-0.448-1-1-1-0.473 0-0.87 0.329-0.974 0.77-0.567-0.045-1.17-0.003-1.796 0.138 0.047-0.304 0.102-0.626 0.166-0.964 0.977-0.094 1.944-0.253 2.842-0.473 0.536-0.131 0.864-0.672 0.733-1.209-0.131-0.536-0.673-0.864-1.21-0.733-0.621 0.152-1.285 0.272-1.963 0.358 0.048-0.208 0.1-0.409 0.155-0.583zm-3.686 8.015c0.166-0.34 0.414-0.697 0.758-1.037 0.02 0.348 0.053 0.67 0.098 0.973 0.083 0.56 0.207 1.048 0.341 1.477-0.243 0.109-0.47 0.184-0.674 0.227-0.429 0.092-0.588 0.019-0.614 0.006l-0.004-0.001c-0.162-0.193-0.329-0.774 0.095-1.645zm4.498-2.562c-0.308 1.112-0.89 2.03-1.568 2.73-0.035-0.164-0.067-0.338-0.095-0.525-0.076-0.513-0.117-1.132-0.088-1.904 0.033-0.013 0.067-0.024 0.1-0.036l1.651-0.265zm-1.651 0.265l1.651-0.265c-0.495-0.025-1.049 0.053-1.651 0.265zM7.536 6.29c-2.02-0.589-3.67-0.038-4.456 0.33-0.5 0.234-0.716 0.83-0.482 1.33 0.234 0.5 0.83 0.715 1.33 0.481 0.53-0.248 1.66-0.626 3.048-0.222 0.365 0.107 0.569 0.248 0.69 0.37 0.122 0.123 0.204 0.27 0.258 0.454 0.067 0.225 0.087 0.446 0.09 0.69C7.84 9.68 7.655 9.64 7.459 9.606c-1.146-0.199-2.733-0.215-4.262 0.64-1.271 0.713-1.796 2.168-1.682 3.448 0.12 1.326 0.94 2.679 2.572 3.136 1.48 0.414 2.913-0.045 3.877-0.507l0.08-0.04c0.122 0.416 0.506 0.719 0.96 0.719 0.553 0 1-0.448 1-1V10.5c0-0.053 0.002-0.12 0.005-0.2 0.012-0.417 0.034-1.16-0.168-1.838C9.71 8.023 9.48 7.57 9.086 7.172S8.176 6.478 7.538 6.29H7.537zm-0.419 5.287c0.344 0.06 0.647 0.143 0.887 0.222v2.197c-0.224 0.156-0.538 0.35-0.904 0.525-0.792 0.38-1.682 0.605-2.473 0.384-0.698-0.195-1.06-0.742-1.119-1.389-0.062-0.693 0.243-1.286 0.667-1.523 0.987-0.553 2.06-0.569 2.943-0.415z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M16.961 5.987c0.13-0.394-0.082-0.818-0.475-0.949-0.393-0.13-0.818 0.083-0.948 0.476-0.148 0.445-0.304 1.04-0.42 1.512-0.736 0.026-1.446 0.018-2.067-0.024-0.413-0.028-0.771 0.284-0.8 0.697-0.027 0.413 0.285 0.771 0.698 0.8 0.563 0.038 1.19 0.05 1.844 0.037-0.144 0.765-0.241 1.449-0.3 2.064-1.215 0.642-2.061 1.504-2.539 2.412-0.613 1.166-0.66 2.556 0.206 3.443 0.571 0.584 1.408 0.64 2.129 0.485 0.405-0.087 0.825-0.248 1.24-0.474l0.018 0.046c0.145 0.389 0.577 0.586 0.965 0.44 0.388-0.144 0.585-0.576 0.44-0.964-0.056-0.152-0.114-0.291-0.17-0.424 1.023-0.936 1.915-2.308 2.285-4.047 0.638 0.312 1.07 0.836 1.278 1.4 0.227 0.613 0.213 1.312-0.097 1.952-0.308 0.636-0.933 1.265-2.015 1.681-0.387 0.149-0.58 0.583-0.431 0.97 0.149 0.386 0.582 0.579 0.969 0.43 1.387-0.533 2.33-1.402 2.827-2.427 0.494-1.02 0.518-2.143 0.154-3.127-0.414-1.116-1.3-2.01-2.505-2.424 0.002-0.073 0.003-0.147 0.003-0.222C19.25 9.336 18.914 9 18.5 9c-0.405 0-0.735 0.322-0.75 0.724-0.524-0.005-1.084 0.07-1.672 0.237 0.064-0.455 0.148-0.953 0.257-1.5 1.185-0.089 2.364-0.252 3.337-0.48 0.403-0.095 0.653-0.5 0.558-0.902-0.095-0.404-0.498-0.654-0.902-0.559-0.767 0.18-1.69 0.318-2.637 0.406 0.085-0.33 0.18-0.67 0.27-0.94zm-3.68 7.723c0.227-0.43 0.6-0.886 1.147-1.3 0.017 0.492 0.065 0.926 0.137 1.317 0.094 0.52 0.236 0.974 0.386 1.373-0.306 0.171-0.632 0.3-0.977 0.374-0.485 0.104-0.687-0.012-0.742-0.068-0.24-0.245-0.394-0.853 0.05-1.696zm4.315-2.487c-0.21 0.966-0.7 2.022-1.414 2.848-0.052-0.184-0.1-0.385-0.142-0.612-0.089-0.49-0.14-1.092-0.111-1.866 0.11-0.042 0.222-0.082 0.339-0.12 0.481-0.16 0.924-0.238 1.328-0.25zM7.96 6.53C5.72 5.878 3.958 6.681 3.385 6.997c-0.363 0.2-0.494 0.657-0.294 1.02C3.29 8.378 3.747 8.51 4.11 8.31c0.405-0.223 1.736-0.833 3.43-0.34 0.773 0.227 1.098 0.64 1.264 1.056 0.133 0.332 0.175 0.691 0.188 1.042-0.27-0.075-0.581-0.15-0.923-0.21-1.132-0.202-2.682-0.263-4.122 0.427-1.586 0.76-2.13 2.316-1.902 3.697 0.224 1.356 1.216 2.666 2.8 2.951 1.43 0.258 2.806-0.256 3.757-0.761 0.14-0.074 0.271-0.148 0.396-0.222v0.3c0 0.414 0.335 0.75 0.75 0.75 0.414 0 0.75-0.336 0.75-0.75v-5.79c0-0.454 0-1.236-0.3-1.99-0.331-0.829-1.005-1.578-2.236-1.94H7.96zm-0.153 4.804c0.483 0.086 0.898 0.206 1.19 0.305v2.506l-0.105 0.078C8.653 14.4 8.31 14.63 7.9 14.847c-0.84 0.447-1.85 0.779-2.788 0.61-0.845-0.152-1.445-0.866-1.586-1.72-0.138-0.83 0.179-1.673 1.07-2.1 1.037-0.496 2.226-0.478 3.212-0.303z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/ic_fluent_translate_24_filled"/>
<item android:state_enabled="true" android:drawable="@drawable/ic_fluent_translate_24_regular"/>
<item android:drawable="@drawable/ic_fluent_translate_24_regular"/>
</selector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="?colorSecondary" android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
</vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="?colorSecondary" android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
</vector>

View File

@ -42,8 +42,8 @@
android:layout_toStartOf="@id/visibility"
android:background="?android:selectableItemBackgroundBorderless"
android:scaleType="center"
android:src="@drawable/ic_visibility"
android:tint="?android:textColorSecondary" />
android:src="@drawable/ic_translate"
android:tint="@color/translate_icon" />
<ImageView
android:id="@+id/avatar"

View File

@ -231,6 +231,7 @@
<color name="favorite_selected">@color/warning_500</color>
<color name="bookmark_selected">@color/success_500</color>
<color name="boost_selected">?android:colorPrimary</color>
<color name="translate_selected">?android:colorPrimary</color>
<color name="shortcut_icon_background">#282C37</color>
<!-- <color name="shortcut_icon_foreground">@color/primary_700</color>-->