From 387016bb688f4135458b533a1b11cbe5e30853a0 Mon Sep 17 00:00:00 2001 From: John Andrew Camu Date: Fri, 29 Dec 2023 07:23:32 +0800 Subject: [PATCH 1/5] Fixed margin in big screen (#3922) --- .../ui/preferences/destinations/AppDrawerPreferences.kt | 2 +- src/com/android/launcher3/DeviceProfile.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt index 6edfc730405..a3abc417193 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt @@ -265,7 +265,7 @@ fun AppDrawerPreferences() { SliderPreference( adapter = prefs2.drawerLeftRightMarginFactor.getAdapter(), label = stringResource(id = R.string.app_drawer_indent_label), - valueRange = 0.0F..1.0F, + valueRange = 0.0F..2.0F, step = 0.01F, showAsPercentage = true, ) diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 1af2c68ad99..e7347e3bd0d 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -1313,9 +1313,8 @@ private void updateAllAppsContainerWidth() { } var allAppLeftRightMarginMultiplier = PreferenceExtensionsKt .firstBlocking(preferenceManager2.getDrawerLeftRightMarginFactor()); - var margin = pxFromDp(inv.allAppsCellSize[mTypeIndex].y, mMetrics, allAppLeftRightMarginMultiplier); - allAppsLeftRightMargin *= margin; - allAppsLeftRightPadding *= margin; + allAppsLeftRightMargin *= allAppLeftRightMarginMultiplier; + allAppsLeftRightPadding *= allAppLeftRightMarginMultiplier; } private void setupAllAppsStyle(Context context) { From a3fa2d1a3e11de584f78abdfcee89665bc1c4b7f Mon Sep 17 00:00:00 2001 From: MrSluffy Date: Fri, 29 Dec 2023 08:40:28 +0800 Subject: [PATCH 2/5] Set UiPlugin and UiCommon to compileOnly --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 60ca8bf90ec..1af6cafc1b7 100644 --- a/build.gradle +++ b/build.gradle @@ -316,9 +316,9 @@ dependencies { withQuickstepImplementation projects.systemUnFold withQuickstepImplementation projects.systemUIViewCapture withQuickstepImplementation projects.systemUILog - withQuickstepImplementation projects.systemUIPlugin + withQuickstepCompileOnly projects.systemUIPlugin withQuickstepImplementation projects.systemUIPluginCore - withQuickstepImplementation projects.systemUICommon + withQuickstepCompileOnly projects.systemUICommon implementation fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd-14.jar') From 10b9a76213b341c942fe5e413ed8b69c52b7c3c0 Mon Sep 17 00:00:00 2001 From: MrSluffy Date: Fri, 29 Dec 2023 09:08:29 +0800 Subject: [PATCH 3/5] Fixed margin no effect --- lawnchair/res/values/config.xml | 2 +- src/com/android/launcher3/DeviceProfile.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lawnchair/res/values/config.xml b/lawnchair/res/values/config.xml index bc541f549be..29e5a2a8a95 100644 --- a/lawnchair/res/values/config.xml +++ b/lawnchair/res/values/config.xml @@ -120,7 +120,7 @@ 1.0 1.0 1.0 - 0.1 + 0.4 5 3 10 diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index e7347e3bd0d..c66829ab334 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -1313,8 +1313,9 @@ private void updateAllAppsContainerWidth() { } var allAppLeftRightMarginMultiplier = PreferenceExtensionsKt .firstBlocking(preferenceManager2.getDrawerLeftRightMarginFactor()); - allAppsLeftRightMargin *= allAppLeftRightMarginMultiplier; - allAppsLeftRightPadding *= allAppLeftRightMarginMultiplier; + var marginMultiplier = allAppLeftRightMarginMultiplier * 100; + allAppsLeftRightMargin *= marginMultiplier; + allAppsLeftRightPadding *= marginMultiplier; } private void setupAllAppsStyle(Context context) { From f792ed7aae75d7f81d7dd28d5cf3d926a85b8788 Mon Sep 17 00:00:00 2001 From: MrSluffy Date: Fri, 29 Dec 2023 14:35:14 +0800 Subject: [PATCH 4/5] Update marginMultiplier calculation for better tablet responsiveness --- src/com/android/launcher3/DeviceProfile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index c66829ab334..f731992125b 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -1313,7 +1313,7 @@ private void updateAllAppsContainerWidth() { } var allAppLeftRightMarginMultiplier = PreferenceExtensionsKt .firstBlocking(preferenceManager2.getDrawerLeftRightMarginFactor()); - var marginMultiplier = allAppLeftRightMarginMultiplier * 100; + var marginMultiplier = allAppLeftRightMarginMultiplier * (!isTablet ? 100 : 2); allAppsLeftRightMargin *= marginMultiplier; allAppsLeftRightPadding *= marginMultiplier; } From 4c997b2ce730fc51af93e60fb91e08174d9e5c97 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 30 Dec 2023 13:07:26 +0800 Subject: [PATCH 5/5] Update dependency com.airbnb.android:lottie to v6.3.0 (#3925) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1af6cafc1b7..c37ef32ed16 100644 --- a/build.gradle +++ b/build.gradle @@ -384,7 +384,7 @@ dependencies { // Persian Date implementation 'com.github.samanzamani:PersianDate:1.7.1' - implementation 'com.airbnb.android:lottie:6.2.0' + implementation 'com.airbnb.android:lottie:6.3.0' // Smartspacer implementation('com.kieronquinn.smartspacer:sdk-client:1.0.6') {