Unified UI colors across the app. Dark sidebar and dark app theme for

dark Alert Dialogs
This commit is contained in:
Leon Omelan
2019-10-06 18:06:41 +02:00
committed by Fredrik Fornwall
parent c50a367063
commit 468f878a38
5 changed files with 8 additions and 15 deletions

View File

@@ -454,7 +454,7 @@ public final class TermuxActivity extends Activity implements ServiceConnection
} else { } else {
firstLineView.setPaintFlags(firstLineView.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); firstLineView.setPaintFlags(firstLineView.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
} }
int color = sessionRunning || sessionAtRow.getExitStatus() == 0 ? Color.BLACK : Color.RED; int color = sessionRunning || sessionAtRow.getExitStatus() == 0 ? Color.WHITE : Color.RED;
firstLineView.setTextColor(color); firstLineView.setTextColor(color);
return row; return row;
} }

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#E0E0E0" /> <solid android:color="#212325" />
</shape> </shape>

View File

@@ -2,6 +2,6 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android" <ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@android:color/darker_gray" > android:color="@android:color/darker_gray" >
<item> <item>
<color android:color="@android:color/white" /> <color android:color="@android:color/background_dark" />
</item> </item>
</ripple> </ripple>

View File

@@ -26,7 +26,7 @@
android:layout_width="240dp" android:layout_width="240dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:background="@android:color/white" android:background="@android:color/background_dark"
android:choiceMode="singleChoice" android:choiceMode="singleChoice"
android:divider="@android:color/transparent" android:divider="@android:color/transparent"
android:dividerHeight="0dp" android:dividerHeight="0dp"

View File

@@ -3,14 +3,13 @@
<!-- See https://developer.android.com/training/material/theme.html for how to customize the Material theme. --> <!-- See https://developer.android.com/training/material/theme.html for how to customize the Material theme. -->
<!-- NOTE: Cannot use "Light." since it hides the terminal scrollbar on the default black background. --> <!-- NOTE: Cannot use "Light." since it hides the terminal scrollbar on the default black background. -->
<style name="Theme.Termux" parent="@android:style/Theme.Material.Light.NoActionBar"> <style name="Theme.Termux" parent="@android:style/Theme.Material.NoActionBar">
<item name="android:statusBarColor">#000000</item> <item name="android:statusBarColor">#000000</item>
<item name="android:colorPrimary">#FF000000</item> <item name="android:colorPrimary">#FF000000</item>
<item name="android:windowBackground">@android:color/black</item> <item name="android:windowBackground">@android:color/black</item>
<!-- Seen in buttons on left drawer: --> <!-- Seen in buttons on left drawer: -->
<item name="android:colorAccent">#212121</item> <item name="android:colorAccent">#FDFDFD</item>
<item name="android:alertDialogTheme">@style/TermuxAlertDialogStyle</item>
<!-- Avoid action mode toolbar pushing down terminal content when <!-- Avoid action mode toolbar pushing down terminal content when
selecting text on pre-6.0 (non-floating toolbar). --> selecting text on pre-6.0 (non-floating toolbar). -->
<item name="android:windowActionModeOverlay">true</item> <item name="android:windowActionModeOverlay">true</item>
@@ -22,10 +21,4 @@
<item name="android:windowAllowReturnTransitionOverlap">true</item> <item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item> <item name="android:windowAllowEnterTransitionOverlap">true</item>
</style> </style>
<style name="TermuxAlertDialogStyle" parent="@android:style/Theme.Material.Light.Dialog.Alert">
<!-- Seen in buttons on alert dialog: -->
<item name="android:colorAccent">#212121</item>
</style>
</resources> </resources>