Skip to content

Commit

Permalink
Merge branch 'LawnchairLauncher:14-dev' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored Aug 23, 2024
2 parents 24d31c2 + 048952d commit 7870205
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 33 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ plugins {
id 'com.android.library' version "8.5.2" apply false
id 'com.android.test' version '8.5.2' apply false
id 'androidx.baselineprofile' version '1.3.0'
id 'org.jetbrains.kotlin.android' version "2.0.10"
id 'org.jetbrains.kotlin.plugin.compose' version "2.0.10"
id 'org.jetbrains.kotlin.plugin.parcelize' version "2.0.10"
id 'org.jetbrains.kotlin.plugin.serialization' version "2.0.10"
id "com.google.devtools.ksp" version "2.0.10-1.0.24"
id 'org.jetbrains.kotlin.android' version "2.0.20"
id 'org.jetbrains.kotlin.plugin.compose' version "2.0.20"
id 'org.jetbrains.kotlin.plugin.parcelize' version "2.0.20"
id 'org.jetbrains.kotlin.plugin.serialization' version "2.0.20"
id "com.google.devtools.ksp" version "2.0.20-1.0.24"
id 'com.google.protobuf' version "0.9.4"
id 'app.cash.licensee' version "1.11.0"
id 'dev.rikka.tools.refine' version "4.4.0"
Expand Down
20 changes: 20 additions & 0 deletions lawnchair/res/color-night-v30/taskbar_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source 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.
-->
<!-- Make sure to align any changes to
frameworks/base/libs/WindowManager/Shell/res/color/taskbar_background_dark.xml -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/transparent" />
</selector>
20 changes: 20 additions & 0 deletions lawnchair/res/color-v30/taskbar_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source 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.
-->
<!-- Make sure to align any changes to
frameworks/base/libs/WindowManager/Shell/res/color/taskbar_background_dark.xml -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/transparent" />
</selector>
5 changes: 2 additions & 3 deletions lawnchair/src/app/lawnchair/smartspace/SmartspacerView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ class SmartspacerView(context: Context, attrs: AttributeSet?) : BcSmartspaceView
override fun setPadding(left: Int, top: Int, right: Int, bottom: Int) {
val ctx = LawnchairLauncher.instance?.launcherNullable
val dp = ctx?.deviceProfile
val leftPadding = dp?.widgetPadding?.left
val leftTopPadding = leftPadding ?: (left + 16)
super.setPadding(leftTopPadding, leftTopPadding, right, bottom)
val leftPadding = dp?.widgetPadding?.left ?: (left + 16)
super.setPadding(leftPadding, top, right, bottom)
}

override val config = SmartspaceConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import app.lawnchair.preferences.getAdapter
import app.lawnchair.preferences.preferenceManager
import app.lawnchair.preferences2.preferenceManager2
import app.lawnchair.ui.preferences.LocalIsExpandedScreen
import app.lawnchair.ui.preferences.components.controls.SliderPreference
import app.lawnchair.ui.preferences.components.controls.SwitchPreference
import app.lawnchair.ui.preferences.components.layout.ExpandAndShrink
import app.lawnchair.ui.preferences.components.layout.PreferenceGroup
import app.lawnchair.ui.preferences.components.layout.PreferenceLayout
import com.android.launcher3.R
Expand Down Expand Up @@ -44,6 +46,31 @@ fun ExperimentalFeaturesPreferences(
label = stringResource(id = R.string.always_reload_icons_label),
description = stringResource(id = R.string.always_reload_icons_description),
)

val enableWallpaperBlur = prefs.enableWallpaperBlur.getAdapter()

SwitchPreference(
adapter = enableWallpaperBlur,
label = stringResource(id = R.string.wallpaper_blur),
)
ExpandAndShrink(visible = enableWallpaperBlur.state.value) {
SliderPreference(
label = stringResource(id = R.string.wallpaper_background_blur),
adapter = prefs.wallpaperBlur.getAdapter(),
step = 5,
valueRange = 0..100,
showUnit = "%",
)
}
ExpandAndShrink(visible = enableWallpaperBlur.state.value) {
SliderPreference(
label = stringResource(id = R.string.wallpaper_background_blur_factor),
adapter = prefs.wallpaperBlurFactorThreshold.getAdapter(),
step = 5,
valueRange = 0..100,
showUnit = "%",
)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,31 +107,6 @@ fun HomeScreenPreferences(
adapter = prefs2.showTopShadow.getAdapter(),
label = stringResource(id = R.string.show_sys_ui_scrim),
)

val enableWallpaperBlur = prefs.enableWallpaperBlur.getAdapter()

SwitchPreference(
adapter = enableWallpaperBlur,
label = stringResource(id = R.string.wallpaper_blur),
)
ExpandAndShrink(visible = enableWallpaperBlur.state.value) {
SliderPreference(
label = stringResource(id = R.string.wallpaper_background_blur),
adapter = prefs.wallpaperBlur.getAdapter(),
step = 5,
valueRange = 0..100,
showUnit = "%",
)
}
ExpandAndShrink(visible = enableWallpaperBlur.state.value) {
SliderPreference(
label = stringResource(id = R.string.wallpaper_background_blur_factor),
adapter = prefs.wallpaperBlurFactorThreshold.getAdapter(),
step = 5,
valueRange = 0..100,
showUnit = "%",
)
}
}
PreferenceGroup(heading = stringResource(id = R.string.layout)) {
val columns by prefs.workspaceColumns.getAdapter()
Expand Down

0 comments on commit 7870205

Please sign in to comment.