Skip to content

Commit

Permalink
Add toggle app icons shadow
Browse files Browse the repository at this point in the history
- Closes : #4570
  • Loading branch information
MrSluffy committed Aug 18, 2024
1 parent b4d45f7 commit 695e814
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lawnchair/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@
<string name="auto_adaptive_icons_label">Auto-adaptive icons</string>
<string name="auto_adaptive_icons_description">For all non-adaptive icons</string>

<string name="shadow_bg_icons_label">Enable shadow background icons</string>

<string name="background_lightness_label">Background lightness</string>
<string name="adaptive_icon_background_description">Use 100% background lightness for white</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class PreferenceManager private constructor(private val context: Context) : Base
val allowRotation = BoolPref("pref_allowRotation", false)
val wrapAdaptiveIcons = BoolPref("prefs_wrapAdaptive", false, recreate)
val transparentIconBackground = BoolPref("prefs_transparentIconBackground", false, recreate)
val shadowBGIcons = BoolPref("pref_shadowBGIcons", true, recreate)
val addIconToHome = BoolPref("pref_add_icon_to_home", true)
val hotseatColumns = IntPref("pref_hotseatColumns", 4, reloadGrid)
val workspaceColumns = IntPref("pref_workspaceColumns", 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ fun GeneralPreferences() {
label = stringResource(id = R.string.auto_adaptive_icons_label),
description = stringResource(id = R.string.auto_adaptive_icons_description),
)
SwitchPreference(
adapter = prefs.shadowBGIcons.getAdapter(),
label = stringResource(id = R.string.shadow_bg_icons_label),
)

ExpandAndShrink(visible = wrapAdaptiveIcons.state.value) {
SliderPreference(
Expand Down

0 comments on commit 695e814

Please sign in to comment.