mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 16:40:32 +00:00
Fix colors in PeerTube Settings Fragment
This commit is contained in:
parent
0afdac5683
commit
67942a906a
@ -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
|
||||
|
@ -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" />
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user