mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-02 02:04:48 +12:00
This reverts commit 6ee1a39fb4
.
This commit is contained in:
parent
6ee1a39fb4
commit
eed85a2c7d
5 changed files with 4 additions and 49 deletions
|
@ -5,8 +5,6 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import com.google.android.material.color.DynamicColors;
|
||||
import com.google.android.material.color.DynamicColorsOptions;
|
||||
|
||||
import com.panda3ds.pandroid.AlberDriver;
|
||||
import com.panda3ds.pandroid.R;
|
||||
|
@ -32,11 +30,6 @@ public class PandroidApplication extends Application {
|
|||
if (GlobalConfig.get(GlobalConfig.KEY_LOGGER_SERVICE)) {
|
||||
startService(new Intent(this, LoggerService.class));
|
||||
}
|
||||
if (GlobalConfig.get(GlobalConfig.KEY_DYNAMIC_COLORS)) {
|
||||
DynamicColorsOptions dynamicColorsOptions = new DynamicColorsOptions.Builder()
|
||||
.build();
|
||||
DynamicColors.applyToActivitiesIfAvailable(this, dynamicColorsOptions);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getThemeId() {
|
||||
|
|
|
@ -3,8 +3,6 @@ package com.panda3ds.pandroid.app.preferences;
|
|||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.SwitchPreference;
|
||||
import com.google.android.material.color.DynamicColors;
|
||||
|
||||
import com.panda3ds.pandroid.R;
|
||||
import com.panda3ds.pandroid.app.BaseActivity;
|
||||
|
@ -25,23 +23,5 @@ public class AppearancePreferences extends BasePreferenceFragment {
|
|||
GlobalConfig.set(GlobalConfig.KEY_APP_THEME, (int) value);
|
||||
return false;
|
||||
});
|
||||
setItemClick("dynamic_colors", pref -> GlobalConfig.set(GlobalConfig.KEY_DYNAMIC_COLORS, ((SwitchPreference) pref).isChecked()));
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
refresh();
|
||||
}
|
||||
|
||||
private void refresh() {
|
||||
((SwitchPreference) findPreference("dynamic_colors")).setChecked(GlobalConfig.get(GlobalConfig.KEY_DYNAMIC_COLORS));
|
||||
if (!DynamicColors.isDynamicColorAvailable()) {
|
||||
((SwitchPreference) findPreference("dynamic_colors")).setEnabled(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ public class GlobalConfig {
|
|||
|
||||
public static final Key<Boolean> KEY_SHADER_JIT = new Key<>("emu.shader_jit", false);
|
||||
public static final Key<Boolean> KEY_SHOW_PERFORMANCE_OVERLAY = new Key<>("dev.performanceOverlay", false);
|
||||
public static final Key<Boolean> KEY_DYNAMIC_COLORS = new Key<>("app.dynamic_colors", false);
|
||||
public static final Key<Boolean> KEY_LOGGER_SERVICE = new Key<>("dev.loggerService", false);
|
||||
public static final Key<Integer> KEY_APP_THEME = new Key<>("app.theme", THEME_ANDROID);
|
||||
public static final Key<Boolean> KEY_SCREEN_GAMEPAD_VISIBLE = new Key<>("app.screen_gamepad.visible", true);
|
||||
|
|
|
@ -34,9 +34,6 @@
|
|||
<string name="light">Light</string>
|
||||
<string name="dark">Dark</string>
|
||||
<string name="black">Black</string>
|
||||
<string name="colors">Colors</string>
|
||||
<string name="pref_dynamic_colors_title">Use Dynamic Colors</string>
|
||||
<string name="pref_dynamic_colors_summary">Dynamic colors will be used.</string>
|
||||
<!-- Game Menu -->
|
||||
<string name="actions">Actions</string>
|
||||
<string name="exit">Exit</string>
|
||||
|
@ -59,8 +56,8 @@
|
|||
<string name="pref_performance_monitor_summary">Show overlay with fps, memory, etc.</string>
|
||||
<string name="pref_logger_service_title">Logger</string>
|
||||
<string name="pref_logger_service_summary">Store application logs to file.</string>
|
||||
<string name="graphics">Graphics</string>
|
||||
<string name="pref_shader_jit_title">Shader JIT</string>
|
||||
<string name="pref_shader_jit_summary">Use shader recompiler.</string>
|
||||
<string name="graphics">Graphics</string>
|
||||
<string name="loading">Loading</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<com.panda3ds.pandroid.view.preferences.SingleSelectionPreferences
|
||||
app:key="theme"
|
||||
app:title="@string/theme"
|
||||
|
@ -13,16 +11,4 @@
|
|||
<Preference app:title="@string/black"/>
|
||||
|
||||
</com.panda3ds.pandroid.view.preferences.SingleSelectionPreferences>
|
||||
|
||||
<PreferenceCategory
|
||||
app:iconSpaceReserved="false"
|
||||
app:title="@string/colors">
|
||||
|
||||
<SwitchPreference
|
||||
android:key="dynamic_colors"
|
||||
app:title="@string/pref_dynamic_colors_title"
|
||||
app:summary="@string/pref_dynamic_colors_summary"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
</PreferenceScreen>
|
Loading…
Add table
Add a link
Reference in a new issue