Add preference to adjust wallpaper blur radius
This commit is contained in:
@@ -532,6 +532,7 @@
|
||||
<string name="preference_blur_wallpaper">Blur wallpaper</string>
|
||||
<string name="preference_blur_wallpaper_summary">Use a blur effect on the wallpaper</string>
|
||||
<string name="preference_blur_wallpaper_unsupported">Not supported on this device</string>
|
||||
<string name="preference_blur_wallpaper_radius">Blur radius</string>
|
||||
<string name="preference_wallpaper_summary">Choose a wallpaper</string>
|
||||
<string name="preference_category_badges">Badges</string>
|
||||
<string name="preference_screen_badges_summary">Configure icon badges</string>
|
||||
|
||||
@@ -22,7 +22,7 @@ internal val Context.dataStore: LauncherDataStore by dataStore(
|
||||
}
|
||||
)
|
||||
|
||||
internal const val SchemaVersion = 17
|
||||
internal const val SchemaVersion = 18
|
||||
|
||||
internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
return listOf(
|
||||
@@ -43,5 +43,6 @@ internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
Migration_14_15(),
|
||||
Migration_15_16(),
|
||||
Migration_16_17(),
|
||||
Migration_17_18(),
|
||||
)
|
||||
}
|
||||
@@ -15,6 +15,7 @@ fun createFactorySettings(context: Context): Settings {
|
||||
.setTheme(Settings.AppearanceSettings.Theme.System)
|
||||
.setDimWallpaper(false)
|
||||
.setBlurWallpaper(true)
|
||||
.setBlurWallpaperRadius(32)
|
||||
.setThemeId(UUID(0L, 0L).toString())
|
||||
.setFont(Settings.AppearanceSettings.Font.Outfit)
|
||||
.build()
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package de.mm20.launcher2.preferences.migrations
|
||||
|
||||
import de.mm20.launcher2.preferences.Settings
|
||||
|
||||
class Migration_17_18 : VersionedMigration(17, 18) {
|
||||
override suspend fun applyMigrations(builder: Settings.Builder): Settings.Builder {
|
||||
return builder
|
||||
.setAppearance(builder.appearance.toBuilder()
|
||||
.setBlurWallpaperRadius(32)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,7 @@ message Settings {
|
||||
bool blur_wallpaper = 11;
|
||||
// UUID of the selected theme
|
||||
string theme_id = 12;
|
||||
uint32 blur_wallpaper_radius = 13;
|
||||
}
|
||||
AppearanceSettings appearance = 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user