Skip to content

Commit

Permalink
Fix folder opening location (closes #28)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyancrimew committed Jun 19, 2017
1 parent 836234a commit 6dd1f01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ch/deletescape/lawnchair/folder/Folder.java
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,11 @@ private void centerAboutIcon() {
DeviceProfile grid = mLauncher.getDeviceProfile();

DragLayer.LayoutParams lp = (DragLayer.LayoutParams) getLayoutParams();
DragLayer parent = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
int width = getPaddingLeft() + getPaddingRight() + mContent.getDesiredWidth();
int height = getFolderHeight();

parent.getDescendantRectRelativeToSelf(mFolderIcon, sTempRect);
int centerX = sTempRect.centerX();
int centerY = sTempRect.centerY();
int centeredLeft = centerX - width / 2;
Expand Down

0 comments on commit 6dd1f01

Please sign in to comment.