diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml
index 28fefb0..8ec98ac 100644
--- a/res/values/cherish_strings.xml
+++ b/res/values/cherish_strings.xml
@@ -653,6 +653,20 @@
Label text size
Columns (portrait)
Columns (landscape)
+
+
+ Monet engine
+ Custom color, colorfulness, brightness
+ Use accurate shades
+ Custom color picker
+ Using wallpaper color
+
+ Choosen color: %1$s. Set an empty value to use wallpaper color.
+
+ Invalid color input!
+ Colorfulness
+ Use custom lightness scale
+ Brightness
Power menu animation
diff --git a/res/xml/cherish_settings_theme.xml b/res/xml/cherish_settings_theme.xml
index 918cfe1..a2ae307 100644
--- a/res/xml/cherish_settings_theme.xml
+++ b/res/xml/cherish_settings_theme.xml
@@ -109,6 +109,13 @@
android:summary="%s"
android:defaultValue="0" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/com/cherish/settings/fragments/MonetChromaFactorPreferenceController.kt b/src/com/cherish/settings/fragments/MonetChromaFactorPreferenceController.kt
new file mode 100644
index 0000000..8d6b43c
--- /dev/null
+++ b/src/com/cherish/settings/fragments/MonetChromaFactorPreferenceController.kt
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2022 FlamingoOS Project
+ *
+ * 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.
+ */
+
+package com.cherish.settings.fragments
+
+import android.content.Context
+import android.os.UserHandle
+import android.provider.Settings
+
+import androidx.preference.Preference
+
+import com.android.settings.core.BasePreferenceController
+import com.cherish.settings.preferences.CustomSeekBarPreference
+
+class MonetChromaFactorPreferenceController(
+ context: Context,
+ key: String,
+) : BasePreferenceController(context, key),
+ Preference.OnPreferenceChangeListener {
+
+ override fun getAvailabilityStatus(): Int = AVAILABLE
+
+ override fun updateState(preference: Preference) {
+ super.updateState(preference)
+ val chromaFactor = Settings.Secure.getFloatForUser(
+ mContext.contentResolver,
+ Settings.Secure.MONET_ENGINE_CHROMA_FACTOR,
+ CHROMA_DEFAULT,
+ UserHandle.USER_CURRENT
+ ) * 100
+ (preference as CustomSeekBarPreference).apply {
+ setValue(chromaFactor.toInt())
+ }
+ }
+
+ override fun onPreferenceChange(preference: Preference, newValue: Any): Boolean {
+ return Settings.Secure.putFloatForUser(
+ mContext.contentResolver,
+ Settings.Secure.MONET_ENGINE_CHROMA_FACTOR,
+ (newValue as Int) / 100f,
+ UserHandle.USER_CURRENT
+ )
+ }
+
+ companion object {
+ private const val CHROMA_DEFAULT = 1f
+ }
+}
diff --git a/src/com/cherish/settings/fragments/MonetCustomColorPreferenceController.kt b/src/com/cherish/settings/fragments/MonetCustomColorPreferenceController.kt
new file mode 100644
index 0000000..bc004eb
--- /dev/null
+++ b/src/com/cherish/settings/fragments/MonetCustomColorPreferenceController.kt
@@ -0,0 +1,49 @@
+
+/*
+ * Copyright (C) 2022 FlamingoOS Project
+ *
+ * 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.
+ */
+
+package com.cherish.settings.fragments
+
+import android.content.Context
+import android.os.UserHandle
+import android.provider.Settings
+
+import com.android.settings.R
+import com.android.settings.core.BasePreferenceController
+
+class MonetCustomColorPreferenceController(
+ context: Context,
+ key: String,
+) : BasePreferenceController(context, key) {
+
+ override fun getAvailabilityStatus(): Int = AVAILABLE
+
+ override fun getSummary(): CharSequence? {
+ val customColor = Settings.Secure.getStringForUser(
+ mContext.contentResolver,
+ Settings.Secure.MONET_ENGINE_COLOR_OVERRIDE,
+ UserHandle.USER_CURRENT,
+ )
+ return if (customColor == null || customColor.isBlank()) {
+ mContext.getString(R.string.color_override_default_summary)
+ } else {
+ mContext.getString(
+ R.string.custom_color_override_summary_placeholder,
+ customColor
+ )
+ }
+ }
+}
diff --git a/src/com/cherish/settings/fragments/MonetEngineSettings.kt b/src/com/cherish/settings/fragments/MonetEngineSettings.kt
new file mode 100644
index 0000000..87cd9f1
--- /dev/null
+++ b/src/com/cherish/settings/fragments/MonetEngineSettings.kt
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2022 FlamingoOS Project
+ *
+ * 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.
+ */
+
+package com.cherish.settings.fragments
+
+import com.android.settings.R
+import com.android.settings.search.BaseSearchIndexProvider
+import com.android.settingslib.search.SearchIndexable
+import com.cherish.settings.fragments.CherishDashboardFragment
+
+@SearchIndexable
+class MonetEngineSettings : CherishDashboardFragment() {
+
+ override protected fun getPreferenceScreenResId() = R.xml.monet_engine_settings
+
+ override protected fun getLogTag() = TAG
+
+ companion object {
+ private const val TAG = "MonetEngineSettings"
+
+ @JvmField
+ val SEARCH_INDEX_DATA_PROVIDER = BaseSearchIndexProvider(R.xml.monet_engine_settings)
+ }
+}