зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1072466 - Part 3: Fix reload button padding in new tablet browser toolbar. r=lucasr
This commit is contained in:
Родитель
b605a64ef8
Коммит
098c664937
|
@ -4,6 +4,7 @@
|
|||
|
||||
package org.mozilla.gecko.menu;
|
||||
|
||||
import org.mozilla.gecko.NewTabletUI;
|
||||
import org.mozilla.gecko.R;
|
||||
|
||||
import android.content.Context;
|
||||
|
@ -20,7 +21,9 @@ public class MenuItemActionBar extends ImageButton
|
|||
}
|
||||
|
||||
public MenuItemActionBar(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, R.attr.menuItemActionBarStyle);
|
||||
// TODO: Remove this branch (and associated attr) when old tablet is removed.
|
||||
this(context, attrs, (NewTabletUI.isEnabled(context)) ?
|
||||
R.attr.menuItemActionBarStyleNewTablet : R.attr.menuItemActionBarStyle);
|
||||
}
|
||||
|
||||
public MenuItemActionBar(Context context, AttributeSet attrs, int defStyle) {
|
||||
|
|
|
@ -51,12 +51,10 @@
|
|||
android:paddingLeft="6dip"
|
||||
android:paddingRight="4dip"/>
|
||||
|
||||
<!-- TODO: The reload asset is too small (bug 1072466) so we have white-space above and below the menu item.
|
||||
We add marginTop to center and compensate: remove this when the final asset is added. -->
|
||||
<LinearLayout android:id="@+id/menu_items"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_toLeftOf="@id/tabs"/>
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
<dimen name="forward_default_offset">-13dip</dimen>
|
||||
<dimen name="new_tablet_forward_default_offset">-6dp</dimen>
|
||||
|
||||
<dimen name="new_tablet_browser_toolbar_menu_item_padding">19dp</dimen>
|
||||
|
||||
<dimen name="tabs_counter_size">26sp</dimen>
|
||||
<dimen name="panel_grid_view_column_width">200dp</dimen>
|
||||
|
||||
|
|
|
@ -70,6 +70,13 @@
|
|||
<item name="android:scaleType">fitCenter</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.MenuItemActionBar.NewTablet">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:padding">@dimen/new_tablet_browser_toolbar_menu_item_padding</item>
|
||||
<item name="android:scaleType">center</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.BookmarksListView" parent="Widget.HomeListView">
|
||||
<item name="android:scrollbarStyle">outsideOverlay</item>
|
||||
</style>
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<!-- Style for MenuItemActionBar -->
|
||||
<attr name="menuItemActionBarStyle" format="reference"/>
|
||||
|
||||
<!-- Style for MenuItemActionBar -->
|
||||
<attr name="menuItemActionBarStyleNewTablet" format="reference"/>
|
||||
|
||||
<!-- Style for MenuItemActionBar -->
|
||||
<attr name="menuItemActionModeStyle" format="reference"/>
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<item name="geckoMenuListViewStyle">@style/Widget.GeckoMenuListView</item>
|
||||
<item name="homeListViewStyle">@style/Widget.HomeListView</item>
|
||||
<item name="menuItemActionBarStyle">@style/Widget.MenuItemActionBar</item>
|
||||
<item name="menuItemActionBarStyleNewTablet">@style/Widget.MenuItemActionBar.NewTablet</item>
|
||||
<item name="menuItemActionModeStyle">@style/GeckoActionBar.Button</item>
|
||||
<item name="menuItemShareActionButtonStyle">@style/Widget.MenuItemSecondaryActionBar</item>
|
||||
<item name="panelGridViewStyle">@style/Widget.PanelGridView</item>
|
||||
|
|
Загрузка…
Ссылка в новой задаче