зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1058909 - Part 4: Adjust forward button position and spacing. r=lucasr
This commit is contained in:
Родитель
5c2595748d
Коммит
e612cfefc2
|
@ -19,7 +19,7 @@
|
|||
android:focusable="false"
|
||||
android:background="@drawable/url_bar_entry"/>
|
||||
|
||||
<org.mozilla.gecko.toolbar.ForwardButton style="@style/UrlBar.ImageButton.Forward"
|
||||
<org.mozilla.gecko.toolbar.ForwardButton style="@style/UrlBar.ImageButton.Forward.NewTablet"
|
||||
android:id="@+id/forward"
|
||||
android:layout_alignLeft="@id/back"/>
|
||||
|
||||
|
@ -43,9 +43,7 @@
|
|||
android:layout_toRightOf="@id/back"
|
||||
android:layout_toLeftOf="@id/menu_items"/>
|
||||
|
||||
<!-- We add extra padding to the left side to compensate for site security's
|
||||
negative margin, which is used to move the site security icon closer to
|
||||
the favicon in toolbar_display_layout. -->
|
||||
<!-- Values of marginLeft are used to animate the forward button so don't change its value. -->
|
||||
<org.mozilla.gecko.toolbar.ToolbarDisplayLayout android:id="@+id/display_layout"
|
||||
style="@style/UrlBar.Button.Container"
|
||||
android:layout_toRightOf="@id/back"
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
<dimen name="back_button_width">42dp</dimen>
|
||||
<dimen name="back_button_width_half">21dp</dimen>
|
||||
|
||||
<dimen name="forward_default_offset">-13dip</dimen>
|
||||
<dimen name="new_tablet_forward_default_offset">-6dp</dimen>
|
||||
|
||||
<dimen name="tabs_counter_size">26sp</dimen>
|
||||
<dimen name="panel_grid_view_column_width">200dp</dimen>
|
||||
|
||||
|
|
|
@ -21,12 +21,21 @@
|
|||
<item name="android:layout_marginLeft">@dimen/forward_default_offset</item>
|
||||
</style>
|
||||
|
||||
<style name="UrlBar.ImageButton.Forward.NewTablet">
|
||||
<item name="android:layout_marginLeft">@dimen/new_tablet_forward_default_offset</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
<item name="android:layout_marginTop">11.5dp</item>
|
||||
<item name="android:layout_marginBottom">11.5dp</item>
|
||||
<item name="android:src">@drawable/new_tablet_ic_menu_forward</item>
|
||||
</style>
|
||||
|
||||
<style name="UrlBar.ImageButton.TabCount.NewTablet">
|
||||
<item name="android:background">@drawable/new_tablet_tabs_count</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="UrlBar.Button.Container">
|
||||
<style name="UrlBar.Button.Container">
|
||||
<item name="android:layout_marginTop">6dp</item>
|
||||
<item name="android:layout_marginBottom">6dp</item>
|
||||
<!-- Start with forward hidden -->
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
<dimen name="text_selection_handle_shadow">11dp</dimen>
|
||||
<dimen name="validation_message_height">50dp</dimen>
|
||||
<dimen name="validation_message_margin_top">6dp</dimen>
|
||||
<dimen name="forward_default_offset">-13dip</dimen>
|
||||
<dimen name="url_bar_offset_left">32dp</dimen>
|
||||
<dimen name="history_tab_indicator_height">50dp</dimen>
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import org.mozilla.gecko.animation.ViewHelper;
|
|||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* A toolbar implementation for the tablet redesign (bug 1014156).
|
||||
|
@ -30,7 +29,7 @@ class BrowserToolbarNewTablet extends BrowserToolbarTabletBase {
|
|||
|
||||
final Resources res = getResources();
|
||||
urlBarViewOffset = res.getDimensionPixelSize(R.dimen.url_bar_offset_left);
|
||||
defaultForwardMargin = res.getDimensionPixelSize(R.dimen.forward_default_offset);
|
||||
defaultForwardMargin = res.getDimensionPixelSize(R.dimen.new_tablet_forward_default_offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,15 +47,8 @@ class BrowserToolbarNewTablet extends BrowserToolbarTabletBase {
|
|||
hideUrlEditLayout();
|
||||
}
|
||||
|
||||
// TODO: Copy-pasta from BrowserToolbarTablet - implement a correctly working version.
|
||||
@Override
|
||||
protected void animateForwardButton(final ForwardButtonAnimation animation) {
|
||||
// If the forward button is not visible, we must be
|
||||
// in the phone UI.
|
||||
if (forwardButton.getVisibility() != View.VISIBLE) {
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean showing = (animation == ForwardButtonAnimation.SHOW);
|
||||
|
||||
// if the forward button's margin is non-zero, this means it has already
|
||||
|
|
Загрузка…
Ссылка в новой задаче