Various improvements to dark theme

Signed-off-by: Daniel Bailey <daniel.bailey@grappleIT.co.uk>
This commit is contained in:
Daniel Bailey 2019-05-05 14:48:12 +01:00 committed by Andy Scherzinger
parent 01cfd0ad33
commit c43633ebb9
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
6 changed files with 29 additions and 47 deletions

View file

@ -81,7 +81,7 @@ public class FirstRunActivity extends BaseActivity implements ViewPager.OnPageCh
Button loginButton = findViewById(R.id.login);
loginButton.setBackgroundColor(getResources().getColor(R.color.bg_default));
loginButton.setTextColor(getResources().getColor(R.color.fg_default));
loginButton.setTextColor(getResources().getColor(R.color.primary));
loginButton.setOnClickListener(v -> {
if (getIntent().getBooleanExtra(EXTRA_ALLOW_CLOSE, false)) {

View file

@ -50,7 +50,7 @@
android:ellipsize="end"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="@color/textColor"
android:textColor="@color/fg_default"
android:textSize="@dimen/file_details_username_text_size"
tools:text="DCIM" />
</LinearLayout>

View file

@ -65,8 +65,6 @@
<color name="indicator_dot_selected">#ffffff</color>
<color name="drawer_shadow">#000000</color>
<color name="action_edit_text">#888888</color>
<!-- special transparent action bar colors for image preview -->
<color name="color_transparent">#201D2D44</color>
<color name="color_dark_transparent">#40162233</color>
@ -78,9 +76,6 @@
<!--<color name="background_material_light">#555555</color>-->
<color name="drawer_menu_icon">#ffffff</color>
<color name="date_picker_header_text">#616161</color>
<color name="bg_fallback_highlight">#737373</color>
<color name="switchpref_track">#4DFFFFFF</color>
<color name="bg_fallback_activated">#525252</color>
</resources>

View file

@ -17,6 +17,31 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- General ownCloud app style -->
<style name="Theme.ownCloud" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="android:datePickerDialogTheme">@style/FallbackDatePickerDialogTheme</item>
</style>
<style name="FallbackThemingTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="android:datePickerDialogTheme">@style/FallbackDatePickerDialogTheme</item>
</style>
<style name="FallbackDatePickerDialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
<item name="colorPrimary">@color/bg_default</item>
<item name="android:textAllCaps">false</item>
<item name="android:windowBackground">@color/bg_default</item>
<item name="android:textColor">@color/fg_inverse</item>
<item name="android:datePickerStyle">@style/DatePickerStyle</item>
<item name="colorControlHighlight">@color/bg_fallback_highlight</item>
<item name="colorControlActivated">@color/bg_fallback_highlight</item>
</style>
<style name="DatePickerStyle" parent="">
<item name="android:headerBackground">@color/bg_fallback_highlight</item>
<!-- TODO for < API21 -->
<item name="android:datePickerMode">calendar</item>
</style>
<style name="Theme.ownCloud.Toolbar">
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="windowNoTitle">true</item>

View file

@ -70,8 +70,6 @@
<color name="indicator_dot_selected">#ffffff</color>
<color name="drawer_shadow">#000000</color>
<color name="action_edit_text">#888888</color>
<!-- special transparent action bar colors for image preview -->
<color name="color_transparent">#201D2D44</color>
<color name="color_dark_transparent">#40162233</color>
@ -83,14 +81,10 @@
<!--<color name="background_material_light">#ef4</color>-->
<color name="drawer_menu_icon">#757575</color>
<color name="date_picker_header_text">#ffffff</color>
<color name="bg_fallback_highlight">#616161</color>
<color name="switchpref_track">#4D000000</color>
<!-- Excluded from future app dark theme -->
<color name="themed_fg">#FFFFFF</color>
<color name="themed_fg_inverse">#000000</color>
<color name="bg_fallback_activated">#737373</color>
</resources>

View file

@ -43,14 +43,13 @@
<item name="android:alertDialogTheme">@style/FallbackTheming.Dialog</item>
<item name="dialogTheme">@style/FallbackTheming.Dialog</item>
<item name="android:windowBackground">@color/bg_default</item>
<item name="android:datePickerDialogTheme">@style/FallbackDatePickerDialogTheme</item>
</style>
<style name="FallbackDatePickerDialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
<!-- TODO change these reference names -->
<item name="colorPrimary">@color/bg_default</item>
<item name="android:textAllCaps">false</item>
<item name="android:windowBackground">@color/bg_default</item>
<item name="android:textColor">@color/textColor_inverse</item>
<item name="android:textColor">@color/fg_inverse</item>
<item name="android:datePickerStyle">@style/DatePickerStyle</item>
<item name="colorControlHighlight">@color/bg_fallback_highlight</item>
<item name="colorControlActivated">@color/bg_fallback_highlight</item>
@ -58,8 +57,6 @@
<style name="DatePickerStyle" parent="">
<item name="android:headerBackground">@color/bg_fallback_highlight</item>
<!-- TODO for < API21 -->
<item name="android:datePickerMode">calendar</item>
</style>
<style name="FallbackTheming.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog">
@ -245,30 +242,6 @@
<item name="android:color">@color/textColor</item>
</style>
<!-- Button Bar hack due to Lollipop bug:
https://code.google.com/p/android/issues/detail?id=78302
fix see:
http://stackoverflow.com/questions/27187353/dialog-buttons-with-long-text-not-wrapping-squeezed-out-material-theme-on-an
-->
<style name="Theme.ownCloud.Dialog.ButtonBar" parent="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog">
<!-- Making sure, the button bar uses parent width and is not restricted in height -->
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:height">@null</item>
<item name="android:minHeight">@null</item>
</style>
<style name="Theme.ownCloud.Dialog.ButtonBar.Button" parent="@style/Widget.MaterialComponents.Button.TextButton">
<!-- Setting the weight as follows should result in equally wide buttons filling the alert dialog width,
but instead they span further out of the dialog, breaking in multiple lines though -->
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<!-- setting a fixed width as follows results in narrow buttons with line breaks, but of course this is not a solution -->
<!-- <item name="android:width">100dp</item> -->
<item name="android:textAllCaps">false</item>
<item name="backgroundTint">@color/bg_default</item>
</style>
<style name="PassCodeStyle">
<item name="android:layout_width">50dp</item>
<item name="android:layout_height">50dp</item>
@ -297,11 +270,6 @@
<style name="TextInputLayout" parent="Base.Widget.MaterialComponents.TextInputEditText"></style>
<style name="Nextcloud.TextInputLayout.Login" parent="Widget.MaterialComponents.TextInputLayout.FilledBox">
<item name="boxBackgroundColor">@color/primary</item>
<item name="android:textColorHint">@color/fg_inverse</item>
</style>
<style name="Nextcloud.EditText.Login" parent="ThemeOverlay.MaterialComponents.TextInputEditText">
<item name="colorControlNormal">@color/login_text_color</item>
<item name="colorControlActivated">@color/login_text_color</item>