SystemUI: monet: Allow a more granular control over shades [2/2]
Do that by letting the user control the luminance and chroma factors of accent / background colors Use Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES as an existing medium to store choices Also refactor the code here Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -896,5 +896,11 @@
|
||||
<string name="color_source_preset">Preset</string>
|
||||
<string name="accent_color_title">Accent Color</string>
|
||||
<string name="accent_color_summary">Override default accent color</string>
|
||||
<string name="luminance_factor_title">Luminance</string>
|
||||
<string name="luminance_factor_summary">Higher values produce brighter colors</string>
|
||||
<string name="chroma_factor_title">Chroma</string>
|
||||
<string name="chroma_factor_summary">Higher values produce stronger colors</string>
|
||||
<string name="tint_background_title">Tint Background</string>
|
||||
<string name="tint_background_summary">Make Luminance and Chroma selection affect background colors as well</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -37,4 +37,32 @@
|
||||
android:title="@string/accent_color_title"
|
||||
android:summary="@string/accent_color_summary" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="luminance_factor"
|
||||
android:title="@string/luminance_factor_title"
|
||||
android:summary="@string/luminance_factor_summary"
|
||||
android:max="100"
|
||||
settings:min="-95"
|
||||
settings:interval="5"
|
||||
settings:defaultValue="0"
|
||||
settings:units="%"
|
||||
settings:showSign="true" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="chroma_factor"
|
||||
android:title="@string/chroma_factor_title"
|
||||
android:summary="@string/chroma_factor_summary"
|
||||
android:max="100"
|
||||
settings:min="-95"
|
||||
settings:interval="5"
|
||||
settings:defaultValue="0"
|
||||
settings:units="%"
|
||||
settings:showSign="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="tint_background"
|
||||
android:title="@string/tint_background_title"
|
||||
android:summary="@string/tint_background_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
Reference in New Issue
Block a user