mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 764405 - Adjust site identity popup arrow margin to work with new toolbar icon layout. r=sriram
This commit is contained in:
parent
8f0b4fb245
commit
0c34108df2
@ -39,7 +39,6 @@ import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
@ -177,10 +176,12 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
||||
public void onClick(View view) {
|
||||
int[] lockLocation = new int[2];
|
||||
view.getLocationOnScreen(lockLocation);
|
||||
LayoutParams lockLayoutParams = (LayoutParams) view.getLayoutParams();
|
||||
|
||||
RelativeLayout.LayoutParams iconsLayoutParams =
|
||||
(RelativeLayout.LayoutParams) ((View) view.getParent()).getLayoutParams();
|
||||
|
||||
// Calculate the left margin for the arrow based on the position of the lock icon.
|
||||
int leftMargin = lockLocation[0] - lockLayoutParams.rightMargin;
|
||||
int leftMargin = lockLocation[0] - iconsLayoutParams.rightMargin;
|
||||
SiteIdentityPopup.getInstance().show(mSiteSecurity, leftMargin);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user