mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Fixes Search bar padding when work profile not present.
The full padding was accounted for between the search bar and the work/personal tabs, but only part of it was there when the tabs were not shown. Screenshot: https://screenshot.googleplex.com/8axV9QQ5Qy8MaUn.png Test: Manually with and without work profile added. In the latter case, nothing changed. The screenshot reflects the former case. Fix: 233010483 Change-Id: I11b3c8cc814be48c25cbd9f454c3e122fff96fa0
This commit is contained in:
@@ -128,6 +128,7 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
|
||||
private final int mScrimColor;
|
||||
private final int mHeaderProtectionColor;
|
||||
protected final float mHeaderThreshold;
|
||||
private int mHeaderBottomAdjustment;
|
||||
private ScrimView mScrimView;
|
||||
private int mHeaderColor;
|
||||
private int mTabsProtectionAlpha;
|
||||
@@ -140,6 +141,8 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
|
||||
mScrimColor = Themes.getAttrColor(context, R.attr.allAppsScrimColor);
|
||||
mHeaderThreshold = getResources().getDimensionPixelSize(
|
||||
R.dimen.dynamic_grid_cell_border_spacing);
|
||||
mHeaderBottomAdjustment = getResources().getDimensionPixelSize(
|
||||
R.dimen.all_apps_header_bottom_adjustment);
|
||||
mHeaderProtectionColor = Themes.getAttrColor(context, R.attr.allappsHeaderProtectionColor);
|
||||
|
||||
mWorkManager = new WorkProfileManager(
|
||||
@@ -722,6 +725,9 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
|
||||
mHeaderPaint.setAlpha((int) (getAlpha() * Color.alpha(mHeaderColor)));
|
||||
if (mHeaderPaint.getColor() != mScrimColor && mHeaderPaint.getColor() != 0) {
|
||||
int bottom = getHeaderBottom();
|
||||
if (!mUsingTabs) {
|
||||
bottom += getFloatingHeaderView().getPaddingBottom() - mHeaderBottomAdjustment;
|
||||
}
|
||||
canvas.drawRect(0, 0, canvas.getWidth(), bottom, mHeaderPaint);
|
||||
int tabsHeight = getFloatingHeaderView().getPeripheralProtectionHeight();
|
||||
if (mTabsProtectionAlpha > 0 && tabsHeight != 0) {
|
||||
|
||||
Reference in New Issue
Block a user