1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 08:30:44 +00:00

Fix colors in PeerTube Settings Fragment

This commit is contained in:
krlvm 2021-03-28 19:36:07 +03:00
parent 0afdac5683
commit 67942a906a
No known key found for this signature in database
GPG Key ID: B8552A91FD265536
3 changed files with 14 additions and 2 deletions

View File

@ -3,6 +3,9 @@ package org.schabi.newpipe.settings;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.InputType;
import android.view.LayoutInflater;
@ -145,8 +148,13 @@ public class PeertubeInstanceListFragment extends Fragment {
final MenuItem restoreItem = menu
.add(Menu.NONE, MENU_ITEM_RESTORE_ID, Menu.NONE, R.string.restore_defaults);
restoreItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(),
R.drawable.ic_settings_backup_restore));
final Drawable icon = AppCompatResources.getDrawable(requireContext(),
R.drawable.ic_settings_backup_restore);
if (icon != null) {
icon.mutate();
icon.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);
}
restoreItem.setIcon(icon);
}
@Override

View File

@ -44,6 +44,7 @@
android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"
android:tint="@color/white"
app:backgroundTint="?attr/colorPrimary"
app:fabSize="auto"
app:srcCompat="@drawable/ic_add" />

View File

@ -57,12 +57,15 @@
<style name="WhiteTintTheme">
<item name="tint">@color/white</item>
<item name="iconTint">@color/white</item>
</style>
<style name="DarkTintTheme">
<item name="tint">@color/black</item>
<item name="iconTint">@color/black</item>
</style>
<style name="ContrastTintTheme">
<item name="tint">@color/contrastColor</item>
<item name="iconTint">@color/contrastColor</item>
</style>
</resources>