Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fix navigation bar notification alignment (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed Nov 20, 2019
1 parent 289ee63 commit 33611ad
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,12 +1245,12 @@ private void showNotification(UIButton button, int stringRes) {
getDrawingRect(offsetViewBounds);
offsetDescendantRectToMyCoords(button, offsetViewBounds);

float ratio = WidgetPlacement.viewToWidgetRatio(getContext(), NavigationBarWidget.this);
float ratio = WidgetPlacement.viewToWidgetRatio(getContext(), this);

mPopUpNotification = new TooltipWidget(getContext(), R.layout.library_notification);
mPopUpNotification.getPlacement().parentHandle = getHandle();
mPopUpNotification.getPlacement().anchorY = 0.0f;
mPopUpNotification.getPlacement().translationX = (offsetViewBounds.left + button.getWidth() / 2.0f) * ratio;
mPopUpNotification.getPlacement().translationX = (button.getPaddingLeft() + offsetViewBounds.left + button.getWidth() / 2.0f) * ratio;
mPopUpNotification.getPlacement().translationY = ((offsetViewBounds.top - 60) * ratio);
mPopUpNotification.getPlacement().translationZ = 25.0f;
mPopUpNotification.getPlacement().density = WidgetPlacement.floatDimension(getContext(), R.dimen.tooltip_default_density);
Expand Down

0 comments on commit 33611ad

Please sign in to comment.