fix: Align widget visually to the icon (#7047)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
1 parent
0adb25e7e9
commit
beeb036ff7
3 files changed
+40
-5
No files matched your search
@@ -150,7 +150,8 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon.
|
||||
DeviceProfile profile = mActivity.getDeviceProfile();
|
||||
final PointF appWidgetScale = profile.getAppWidgetScale((ItemInfo) child.getTag());
|
||||
lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
|
||||
appWidgetScale.x, appWidgetScale.y, mBorderSpace, profile.widgetPadding);
|
||||
appWidgetScale.x, appWidgetScale.y, mBorderSpace, profile.widgetPadding,
|
||||
profile.widgetEdgeInsetPx);
|
||||
} else {
|
||||
lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
|
||||
mBorderSpace);
|
||||
@@ -175,13 +176,15 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon.
|
||||
if (child instanceof NavigableAppWidgetHostView) {
|
||||
final PointF appWidgetScale = dp.getAppWidgetScale((ItemInfo) child.getTag());
|
||||
lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
|
||||
appWidgetScale.x, appWidgetScale.y, mBorderSpace, dp.widgetPadding);
|
||||
appWidgetScale.x, appWidgetScale.y, mBorderSpace, dp.widgetPadding,
|
||||
dp.widgetEdgeInsetPx);
|
||||
} else if (isChildQsb(child)) {
|
||||
lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
|
||||
mBorderSpace);
|
||||
1.0f, 1.0f, mBorderSpace, null, dp.widgetEdgeInsetPx);
|
||||
// No need to add padding for Qsb, which is either Smartspace (actual or
|
||||
// preview), or
|
||||
// QsbContainerView.
|
||||
// LC-Note: but still apply edge inset so its outer edges align with icon centre
|
||||
} else {
|
||||
lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
|
||||
mBorderSpace);
|
||||
|
||||
Reference in new issue
Block a user