зеркало из https://github.com/mozilla/gecko-dev.git
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 : 1e798b1d2c66af5e34d8ddbc14db06d94665f5e7
This commit is contained in:
Родитель
1056a21ede
Коммит
f064a76b61
|
@ -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"/>
|
||||
|
|
|
@ -38,7 +38,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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче