Make QS blur togglable [2/2]

Signed-off-by: 00day0 <therandomuser11@gmail.com>
This commit is contained in:
00day0
2020-01-07 01:33:35 +07:00
committed by Hưng Phan
parent 5ebf6e28bc
commit 636167dce5
3 changed files with 32 additions and 0 deletions

18
res/drawable/ic_blur.xml Normal file
View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 CherishOS
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector android:height="24dp" android:viewportHeight="511.9997"
android:viewportWidth="511" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="m387.105,372.594c3.902,1.375 8.188,-0.676 9.566,-4.578 6.328,-17.941 9.301,-36.535 8.84,-55.266 -0.289,-11.512 -9.527,-20.531 -21.039,-20.531 -0.176,0 -0.355,0.004 -0.527,0.008 -5.621,0.141 -10.852,2.461 -14.727,6.531 -3.879,4.074 -5.938,9.414 -5.797,15.035 0.867,34.98 -14.945,69.074 -42.293,91.199 -4.371,3.535 -7.102,8.563 -7.691,14.156 -0.59,5.59 1.031,11.078 4.566,15.449 4.156,5.133 10.246,7.801 16.387,7.801 4.652,0 9.332,-1.531 13.219,-4.676 12.813,-10.363 23.875,-22.711 32.891,-36.699 2.246,-3.48 1.242,-8.121 -2.238,-10.367 -3.484,-2.242 -8.125,-1.238 -10.367,2.242 -8.152,12.645 -18.148,23.801 -29.719,33.164 -2.594,2.098 -6.41,1.691 -8.508,-0.898 -1.016,-1.258 -1.484,-2.836 -1.313,-4.441 0.168,-1.609 0.953,-3.051 2.211,-4.066 30.945,-25.035 48.832,-63.629 47.852,-103.234 -0.082,-3.336 2.563,-6.117 5.906,-6.199h0.148c3.25,0 5.961,2.645 6.043,5.898 0.418,16.898 -2.27,33.691 -7.988,49.906 -1.379,3.906 0.672,8.188 4.578,9.566zM387.105,372.594"/>
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="m439.234,309.488c4.121,-0.414 7.125,-4.094 6.707,-8.215 -3.297,-32.664 -14.91,-63.227 -34.516,-90.84l-141.16,-204.613c-6.254,-9.063 -19.633,-9.094 -25.938,-0.09l-143.328,204.66c-42.09,59.254 -46.766,134.02 -13.957,197.574 32.762,63.453 96.367,103.035 169.156,103.035 102.371,0 180.828,-78.191 189.84,-173.266 0.391,-4.125 -2.637,-7.785 -6.758,-8.176 -4.113,-0.375 -7.785,2.637 -8.176,6.762 -8.219,86.742 -79.676,159.68 -174.906,159.68 -67.152,0 -125.629,-36.426 -155.828,-94.918 -29.648,-57.434 -26.699,-126.316 12.887,-182.047l143.355,-204.703c0.059,-0.082 0.234,-0.336 0.648,-0.336h0.004c0.418,0.004 0.594,0.258 0.652,0.34l141.188,204.656c0.023,0.027 0.043,0.059 0.063,0.086 18.098,25.477 28.813,53.641 31.852,83.703 0.414,4.121 4.098,7.133 8.215,6.707zM439.234,309.488"/>
</vector>

View File

@@ -53,6 +53,8 @@
<string name="enable_clear_all_button_summary">Show clear all notifications button in quick settings instead of default text one</string>
<string name="qs_bg_use_new_tint">QS tile colors</string>
<string name="qs_bg_use_new_tint_summary">Use accent color for qs tile icons and background</string>
<string name="blur_quicksettings">Blur behind quick settings (beta)</string>
<string name="blur_quicksettings_subtitle">blurs darkened background behind quick settings</string>
<!-- In-call feedback -->
<string name="incall_feeedback_vibrate_title">Vibrate to indicate call status</string>

View File

@@ -17,12 +17,22 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/quicksettings_title"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory
android:title="@string/qs_category">
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="qs_panel_bg_use_new_tint"
android:title="@string/qs_bg_use_new_tint"
android:summary="@string/qs_bg_use_new_tint_summary"
android:defaultValue="true" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="qs_blur"
android:icon="@drawable/ic_blur"
android:title="@string/blur_quicksettings"
android:summary="@string/blur_quicksettings_subtitle"
android:defaultValue="true" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="dismiss_all_button"
@@ -36,6 +46,8 @@
android:title="@string/enable_oneui"
android:summary="@string/enable_oneui_summary"
android:defaultValue="true" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/qs_title">