mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1106935 - Move BrowserToolbarTablet menu button right margin hack to xml. r=mhaigh
We couldn't do this before because the button declaration was shared by old and new tablet - this is no longer a problem now that old tablet is no longer in use. --HG-- extra : rebase_source : 4b60fe6ca371e783c8cc648568b8af7ec8791396 extra : source : fb066050757e614338dd185e6f99cfdbdbf818ec
This commit is contained in:
parent
9773bbb1ec
commit
1cd690ae63
@ -82,6 +82,7 @@
|
||||
android:id="@+id/menu"
|
||||
style="@style/UrlBar.ImageButton.NewTablet"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="6dp"
|
||||
android:contentDescription="@string/menu"
|
||||
android:background="@drawable/new_tablet_action_bar_button"
|
||||
android:visibility="gone"/>
|
||||
|
@ -37,7 +37,6 @@
|
||||
<dimen name="new_tablet_site_security_padding_horizontal">8dp</dimen>
|
||||
<dimen name="new_tablet_site_security_right_margin">1dp</dimen>
|
||||
<dimen name="new_tablet_browser_toolbar_height">60dp</dimen>
|
||||
<dimen name="new_tablet_browser_toolbar_menu_right_margin">6dp</dimen>
|
||||
<dimen name="new_tablet_browser_toolbar_menu_item_width">56dp</dimen>
|
||||
<!-- Padding combines with an 18dp image to form the menu item width and height. -->
|
||||
<dimen name="new_tablet_browser_toolbar_menu_item_padding_horizontal">19dp</dimen>
|
||||
|
@ -10,7 +10,6 @@ import org.mozilla.gecko.animation.PropertyAnimator;
|
||||
import org.mozilla.gecko.animation.ViewHelper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
@ -51,16 +50,6 @@ class BrowserToolbarTablet extends BrowserToolbarTabletBase {
|
||||
setButtonEnabled(forwardButton, true);
|
||||
|
||||
updateForwardButtonState(ForwardButtonState.HIDDEN);
|
||||
|
||||
setRightMargin();
|
||||
}
|
||||
|
||||
private void setRightMargin() {
|
||||
// TODO: Remove this hack in favor of resources when old tablet is removed.
|
||||
final Resources res = getContext().getResources();
|
||||
final int rightMargin =
|
||||
res.getDimensionPixelOffset(R.dimen.new_tablet_browser_toolbar_menu_right_margin);
|
||||
setPadding(getPaddingLeft(), getPaddingTop(), rightMargin, getPaddingBottom());
|
||||
}
|
||||
|
||||
private void updateForwardButtonState(final ForwardButtonState state) {
|
||||
|
Loading…
Reference in New Issue
Block a user