Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
There are 2 amoled themes now: old and contrast.
Browse files Browse the repository at this point in the history
  • Loading branch information
f77 committed Jun 16, 2020
1 parent 9789071 commit 2b4edbe
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Security


## [2.21.0] - 2020-06-16
### Added
- There are 2 amoled themes now: old and contrast.

## [2.20.0] - 2020-06-16
### Added
- Added automatically paging of thread's posts while paging the videos in the exoplayer.
Expand Down Expand Up @@ -160,6 +164,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added this changelog.
- Rebuilt to a new Android SDK (29).

[2.21.0]: https://github.com/f77/Dashchan/compare/2.20.0...2.21.0
[2.20.0]: https://github.com/f77/Dashchan/compare/2.19.1...2.20.0
[2.19.1]: https://github.com/f77/Dashchan/compare/2.19.0...2.19.1
[2.19.0]: https://github.com/f77/Dashchan/compare/2.18.0...2.19.0
Expand Down
28 changes: 28 additions & 0 deletions res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@

</style>

<style name="Theme.Main.AmoledContrast" parent="@style/Theme.General.Extended.Main.AmoledContrast">

<item name="android:dialogTheme">@style/Theme.Main.AmoledContrast.Dialog</item>
<item name="android:alertDialogTheme">@style/Theme.Main.AmoledContrast.Dialog.Alert</item>

<item name="android:colorPrimary">@color/color_primary_amoled</item>
<item name="android:colorPrimaryDark">@color/color_primary_amoled</item>
<item name="android:colorAccent">@color/color_accent_amoled</item>
<item name="android:textColorHighlight">@color/color_selection_amoled</item>

</style>

<style name="Theme.Main.Normie" parent="@style/Theme.General.Extended.Main.Normie">

<item name="android:dialogTheme">@style/Theme.Main.Normie.Dialog</item>
Expand Down Expand Up @@ -382,6 +394,14 @@

</style>

<style name="Theme.Main.AmoledContrast.Dialog" parent="@style/Theme.Special.Main.Dark.Dialog">

<item name="android:colorPrimary">@color/color_primary_amoled_contrast</item>
<item name="android:colorPrimaryDark">@color/color_primary_amoled_contrast</item>
<item name="android:colorAccent">@color/color_accent_amoled_contrast</item>

</style>

<style name="Theme.Main.Amoled.Dialog.Alert" parent="@style/Theme.Special.Main.Dark.Dialog.Alert">

<item name="android:colorPrimary">@color/color_primary_amoled</item>
Expand All @@ -390,6 +410,14 @@

</style>

<style name="Theme.Main.AmoledContrast.Dialog.Alert" parent="@style/Theme.Special.Main.Dark.Dialog.Alert">

<item name="android:colorPrimary">@color/color_primary_amoled_contrast</item>
<item name="android:colorPrimaryDark">@color/color_primary_amoled_contrast</item>
<item name="android:colorAccent">@color/color_accent_amoled_contrast</item>

</style>

<style name="Theme.Gallery.Dialog" parent="@android:style/Theme.Material.Dialog">

<item name="android:colorPrimary">@android:color/white</item>
Expand Down
18 changes: 16 additions & 2 deletions res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
<color name="background_window_amoled">@android:color/black</color>
<color name="background_block_amoled">#ff111111</color>
<color name="background_drawer_amoled">#ff0f0f0f</color>
<color name="color_post_primary_amoled">#ffffffff</color>
<color name="color_post_secondary_amoled">#ffffffff</color>
<color name="color_post_primary_amoled">#88ffffff</color>
<color name="color_post_secondary_amoled">#66ffffff</color>
<color name="color_post_grayed_amoled">@color/color_post_secondary_amoled</color>
<color name="color_text_link_amoled">@color/color_accent_amoled</color>
<color name="color_text_quote_amoled">#ff779922</color>
Expand All @@ -125,4 +125,18 @@
<color name="color_accent_amoled">#ffaaaaaa</color>
<color name="color_selection_amoled">#66aaaaaa</color>

<color name="background_window_amoled_contrast">@android:color/black</color>
<color name="background_block_amoled_contrast">#ff111111</color>
<color name="background_drawer_amoled_contrast">#ff0f0f0f</color>
<color name="color_post_primary_amoled_contrast">#ffffffff</color>
<color name="color_post_secondary_amoled_contrast">#ffffffff</color>
<color name="color_post_grayed_amoled_contrast">@color/color_post_secondary_amoled_contrast</color>
<color name="color_text_link_amoled_contrast">@color/color_accent_amoled_contrast</color>
<color name="color_text_quote_amoled_contrast">#ff779922</color>
<color name="color_text_tripcode_amoled_contrast">#ff33cc88</color>
<color name="color_text_capcode_amoled_contrast">#ff66bbff</color>
<color name="color_primary_amoled_contrast">@android:color/black</color>
<color name="color_accent_amoled_contrast">#ffaaaaaa</color>
<color name="color_selection_amoled_contrast">#66aaaaaa</color>

</resources>
33 changes: 33 additions & 0 deletions res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,26 @@

</style>

<style name="Theme.General.Extended.Main.AmoledContrast" parent="@style/Theme.General.Main.Dark">

<item name="android:windowBackground">@color/background_window_amoled_contrast</item>
<item name="backgroundBlock">@color/background_block_amoled_contrast</item>
<item name="backgroundDrawer">@color/background_drawer_amoled_contrast</item>

<item name="colorPrimarySupport">@color/color_primary_amoled_contrast</item>
<item name="colorAccentSupport">@color/color_accent_amoled_contrast</item>

<item name="colorPostPrimary">@color/color_post_primary_amoled_contrast</item>
<item name="colorPostSecondary">@color/color_post_secondary_amoled_contrast</item>
<item name="colorPostGrayed">@color/color_post_grayed_amoled_contrast</item>

<item name="android:textColorLink">@color/color_text_link_amoled_contrast</item>
<item name="colorTextQuote">@color/color_text_quote_amoled_contrast</item>
<item name="colorTextTripcode">@color/color_text_tripcode_amoled_contrast</item>
<item name="colorTextCapcode">@color/color_text_capcode_amoled_contrast</item>

</style>

<style name="Theme.General.Extended.Gallery" parent="@style/Theme.General.Main.Dark">

<item name="android:windowBackground">@android:color/transparent</item>
Expand Down Expand Up @@ -341,6 +361,12 @@

</style>

<style name="Theme.Main.AmoledContrast" parent="@style/Theme.General.Extended.Main.AmoledContrast">

<item name="android:actionBarStyle">@style/Widget.Main.AmoledContrast.ActionBar</item>

</style>

<style name="Theme.Gallery" parent="@style/Theme.General.Extended.Gallery">

<item name="android:actionBarStyle">@style/Widget.Gallery.ActionBar</item>
Expand All @@ -360,6 +386,13 @@

</style>

<style name="Widget.Main.AmoledContrast.ActionBar" parent="@android:style/Widget.Holo.ActionBar">

<item name="android:logo">@android:color/transparent</item>
<item name="android:background">@android:color/black</item>

</style>

<style name="Widget.Gallery.ActionBar" parent="@android:style/Widget.Holo.ActionBar">

<item name="android:background">@android:color/transparent</item>
Expand Down
13 changes: 9 additions & 4 deletions src/com/mishiranu/dashchan/preference/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -909,14 +909,16 @@ public static int getTextScale() {
public static final String VALUE_THEME_NORMIE = "normie";
public static final String VALUE_THEME_NEUTRON = "neutron";
public static final String VALUE_THEME_AMOLED = "amoled";
public static final String VALUE_THEME_AMOLED_CONTRAST = "amoled_contrast";
public static final String[] ENTRIES_THEME = {
"Photon",
"Hadron",
"Burichan",
"Tomorrow",
"Normie",
"Neutron",
"Amoled"
"Amoled",
"Amoled Contrast",
};
public static final String[] VALUES_THEME = {
VALUE_THEME_PHOTON,
Expand All @@ -925,7 +927,8 @@ public static int getTextScale() {
VALUE_THEME_TOMORROW,
VALUE_THEME_NORMIE,
VALUE_THEME_NEUTRON,
VALUE_THEME_AMOLED
VALUE_THEME_AMOLED,
VALUE_THEME_AMOLED_CONTRAST,
};
public static final int[] VALUES_THEME_IDS = {
R.style.Theme_Main_Photon,
Expand All @@ -934,7 +937,8 @@ public static int getTextScale() {
R.style.Theme_Main_Tomorrow,
R.style.Theme_Main_Normie,
R.style.Theme_Main_Neutron,
R.style.Theme_Main_Amoled
R.style.Theme_Main_Amoled,
R.style.Theme_Main_AmoledContrast,
};
public static final String DEFAULT_THEME = VALUE_THEME_PHOTON;
public static final int[][] VALUES_THEME_COLORS = {
Expand All @@ -944,7 +948,8 @@ public static int getTextScale() {
{android.R.attr.windowBackground, R.attr.colorPrimarySupport, R.attr.colorAccentSupport},
{android.R.attr.windowBackground, R.attr.colorPrimarySupport, R.attr.colorAccentSupport},
{android.R.attr.windowBackground, R.attr.colorPrimarySupport, R.attr.colorPostSecondary},
{android.R.attr.windowBackground, R.attr.colorAccentSupport, R.attr.colorAccentSupport}
{android.R.attr.windowBackground, R.attr.colorAccentSupport, R.attr.colorAccentSupport},
{android.R.attr.windowBackground, R.attr.colorAccentSupport, R.attr.colorAccentSupport},
};

public static String getTheme() {
Expand Down

0 comments on commit 2b4edbe

Please sign in to comment.