From c906cb57eefb20f864f6835f2a182dec06fb0612 Mon Sep 17 00:00:00 2001
From: krlvm <51774833+krlvm@users.noreply.github.com>
Date: Mon, 29 Mar 2021 21:19:17 +0300
Subject: [PATCH] Fix colors in setting fragments, cleanup
---
.../settings/PeertubeInstanceListFragment.java | 12 ++----------
.../newpipe/settings/tabs/ChooseTabsFragment.java | 1 -
.../drawable-night/ic_settings_backup_restore.xml | 10 ----------
.../main/res/drawable/ic_settings_backup_restore.xml | 1 +
app/src/main/res/layout/fragment_instance_list.xml | 1 -
app/src/main/res/values/styles.xml | 1 +
app/src/main/res/values/styles_misc.xml | 4 ++++
7 files changed, 8 insertions(+), 22 deletions(-)
delete mode 100644 app/src/main/res/drawable-night/ic_settings_backup_restore.xml
diff --git a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java
index e4da3b14d..74585e12b 100644
--- a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java
@@ -3,9 +3,6 @@ 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;
@@ -148,13 +145,8 @@ 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);
- 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);
+ restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(),
+ R.drawable.ic_settings_backup_restore));
}
@Override
diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java
index 52d128bf0..bb45c8ff7 100644
--- a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java
@@ -112,7 +112,6 @@ public class ChooseTabsFragment 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));
}
diff --git a/app/src/main/res/drawable-night/ic_settings_backup_restore.xml b/app/src/main/res/drawable-night/ic_settings_backup_restore.xml
deleted file mode 100644
index ae22bc141..000000000
--- a/app/src/main/res/drawable-night/ic_settings_backup_restore.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/ic_settings_backup_restore.xml b/app/src/main/res/drawable/ic_settings_backup_restore.xml
index 57f966536..ae22bc141 100644
--- a/app/src/main/res/drawable/ic_settings_backup_restore.xml
+++ b/app/src/main/res/drawable/ic_settings_backup_restore.xml
@@ -1,6 +1,7 @@
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 1c0d0b63c..7c3e0c9b4 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -13,6 +13,7 @@
diff --git a/app/src/main/res/values/styles_misc.xml b/app/src/main/res/values/styles_misc.xml
index 0242dca6e..3f18c7ce9 100644
--- a/app/src/main/res/values/styles_misc.xml
+++ b/app/src/main/res/values/styles_misc.xml
@@ -60,6 +60,10 @@
- @color/white_secondary
+
+