Themes: share app theme colors between desktop and Android (app-themes.css), add theme picker and accent color to the Android app, and add Windows XP, Windows 11, macOS (Liquid Glass) and Cyberpunk 2077 themes with matching terminal schemes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -216,6 +216,23 @@ public class MrTermNative extends Plugin {
|
||||
call.resolve();
|
||||
}
|
||||
|
||||
// Design: Hintergrund hinter Status-/Navigationsleiste und dunkle bzw. helle Symbole
|
||||
@PluginMethod
|
||||
public void bars(PluginCall call) {
|
||||
final boolean light = Boolean.TRUE.equals(call.getBoolean("light", false));
|
||||
final String color = call.getString("color", "#14161d");
|
||||
getActivity().runOnUiThread(() -> {
|
||||
try {
|
||||
android.view.View parent = (android.view.View) getBridge().getWebView().getParent();
|
||||
parent.setBackgroundColor(android.graphics.Color.parseColor(color));
|
||||
androidx.core.view.WindowInsetsControllerCompat c = androidx.core.view.WindowCompat.getInsetsController(getActivity().getWindow(), parent);
|
||||
c.setAppearanceLightStatusBars(light);
|
||||
c.setAppearanceLightNavigationBars(light);
|
||||
} catch (Exception ignored) {}
|
||||
});
|
||||
call.resolve();
|
||||
}
|
||||
|
||||
@PluginMethod
|
||||
public void background(PluginCall call) {
|
||||
getActivity().runOnUiThread(() -> getActivity().moveTaskToBack(true));
|
||||
|
||||
Reference in New Issue
Block a user