зеркало из https://github.com/mozilla/gecko-dev.git
Back out 0740fc10483c (bug 1072469) for robo* bustage
CLOSED TREE
This commit is contained in:
Родитель
5e25592280
Коммит
b3493ebbad
|
@ -410,7 +410,6 @@ gbjar.sources += [
|
|||
'TextSelection.java',
|
||||
'TextSelectionHandle.java',
|
||||
'ThumbnailHelper.java',
|
||||
'toolbar/ActionBarViewFlipper.java',
|
||||
'toolbar/AutocompleteHandler.java',
|
||||
'toolbar/BackButton.java',
|
||||
'toolbar/BrowserToolbar.java',
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_alignLeft="@id/back"/>
|
||||
|
||||
<org.mozilla.gecko.toolbar.BackButton android:id="@id/back"
|
||||
style="@style/UrlBar.ImageButton.NewTablet"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_width="@dimen/back_button_width"
|
||||
android:layout_height="@dimen/back_button_width"
|
||||
android:layout_centerVertical="true"
|
||||
|
@ -61,26 +61,23 @@
|
|||
|
||||
<org.mozilla.gecko.widget.ThemedImageButton
|
||||
android:id="@+id/tabs"
|
||||
style="@style/UrlBar.ImageButton.NewTablet"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_toLeftOf="@id/menu"
|
||||
android:background="@drawable/action_bar_button"/>
|
||||
|
||||
<!-- In a 56x60dp space, centering 24dp image will leave 16x18dp. -->
|
||||
<!-- In a 56dp space, centering 24dp image will leave 16dp on the horizontal sides. -->
|
||||
<org.mozilla.gecko.toolbar.TabCounter android:id="@+id/tabs_counter"
|
||||
style="@style/UrlBar.ImageButton.TabCount.NewTablet"
|
||||
android:layout_alignLeft="@id/tabs"
|
||||
android:layout_alignRight="@id/tabs"
|
||||
android:layout_alignTop="@id/tabs"
|
||||
android:layout_alignBottom="@id/tabs"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_margin="16dp"
|
||||
gecko:layout="@layout/new_tablet_tabs_counter"/>
|
||||
|
||||
<org.mozilla.gecko.widget.ThemedImageButton
|
||||
android:id="@+id/menu"
|
||||
style="@style/UrlBar.ImageButton.NewTablet"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="6dp"
|
||||
android:contentDescription="@string/menu"
|
||||
|
@ -89,7 +86,7 @@
|
|||
|
||||
<org.mozilla.gecko.widget.ThemedImageView
|
||||
android:id="@+id/menu_icon"
|
||||
style="@style/UrlBar.ImageButton.NewTablet"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_alignLeft="@id/menu"
|
||||
android:layout_alignRight="@id/menu"
|
||||
android:src="@drawable/new_tablet_menu"
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
android:layout_height="@dimen/new_tablet_tab_strip_height"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<org.mozilla.gecko.toolbar.ActionBarViewFlipper
|
||||
<org.mozilla.gecko.widget.GeckoViewFlipper
|
||||
android:id="@+id/browser_actionbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/browser_toolbar_height"
|
||||
|
@ -108,7 +108,7 @@
|
|||
android:layout_width="match_parent"
|
||||
style="@style/GeckoActionBar"/>
|
||||
|
||||
</org.mozilla.gecko.toolbar.ActionBarViewFlipper>
|
||||
</org.mozilla.gecko.widget.GeckoViewFlipper>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
<dimen name="browser_toolbar_height">56dp</dimen>
|
||||
<dimen name="browser_toolbar_button_padding">16dp</dimen>
|
||||
<dimen name="new_tablet_browser_toolbar_height">60dp</dimen>
|
||||
|
||||
<!-- If you update one of these values, update the other. -->
|
||||
<dimen name="back_button_width">42dp</dimen>
|
||||
|
@ -16,10 +15,7 @@
|
|||
<dimen name="forward_default_offset">-13dip</dimen>
|
||||
<dimen name="new_tablet_forward_default_offset">-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>
|
||||
<dimen name="new_tablet_browser_toolbar_menu_item_padding_vertical">21dp</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>
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
|
||||
<resources>
|
||||
|
||||
<style name="UrlBar.ImageButton.NewTablet">
|
||||
<item name="android:layout_width">@dimen/new_tablet_browser_toolbar_menu_item_width</item>
|
||||
</style>
|
||||
|
||||
<style name="UrlBar.ImageButton.Forward">
|
||||
<item name="android:contentDescription">@string/forward</item>
|
||||
<item name="android:layout_width">45dip</item>
|
||||
|
@ -37,9 +33,6 @@
|
|||
|
||||
<style name="UrlBar.ImageButton.TabCount.NewTablet">
|
||||
<item name="android:background">@drawable/new_tablet_tabs_count</item>
|
||||
|
||||
<!-- From UrlBar.ImageButton.NewTablet because we can't inherit directly. -->
|
||||
<item name="android:layout_width">@dimen/new_tablet_browser_toolbar_menu_item_width</item>
|
||||
</style>
|
||||
|
||||
<style name="UrlBar.Button.Container">
|
||||
|
@ -72,25 +65,16 @@
|
|||
<style name="Widget.MenuItemActionBar">
|
||||
<item name="android:layout_width">@dimen/browser_toolbar_height</item>
|
||||
<item name="android:layout_height">@dimen/browser_toolbar_height</item>
|
||||
<item name="android:padding">@dimen/browser_toolbar_button_padding</item>
|
||||
<item name="android:background">@drawable/action_bar_button</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
|
||||
<!-- We split up padding* because we can't override it in *.NewTablet otherwise. -->
|
||||
<item name="android:paddingTop">@dimen/browser_toolbar_button_padding</item>
|
||||
<item name="android:paddingBottom">@dimen/browser_toolbar_button_padding</item>
|
||||
<item name="android:paddingLeft">@dimen/browser_toolbar_button_padding</item>
|
||||
<item name="android:paddingRight">@dimen/browser_toolbar_button_padding</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>
|
||||
|
||||
<item name="android:paddingTop">@dimen/new_tablet_browser_toolbar_menu_item_padding_vertical</item>
|
||||
<item name="android:paddingBottom">@dimen/new_tablet_browser_toolbar_menu_item_padding_vertical</item>
|
||||
<item name="android:paddingLeft">@dimen/new_tablet_browser_toolbar_menu_item_padding_horizontal</item>
|
||||
<item name="android:paddingRight">@dimen/new_tablet_browser_toolbar_menu_item_padding_horizontal</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.BookmarksListView" parent="Widget.HomeListView">
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko.toolbar;
|
||||
|
||||
import org.mozilla.gecko.NewTabletUI;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.widget.GeckoViewFlipper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
//TODO: (bug 1058909) Remove this class when old tablet is removed.
|
||||
/**
|
||||
* A temporary view that sets its height based on whether we are on new tablet or not.
|
||||
* Note that this view should be removed when the old tablet is removed and replaced with using
|
||||
* browser_toolbar_height directly.
|
||||
*/
|
||||
public class ActionBarViewFlipper extends GeckoViewFlipper {
|
||||
|
||||
public ActionBarViewFlipper(final Context context, final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
if (NewTabletUI.isEnabled(getContext())) {
|
||||
final ViewGroup.LayoutParams lp = getLayoutParams();
|
||||
lp.height = getResources().getDimensionPixelSize(R.dimen.new_tablet_browser_toolbar_height);
|
||||
setLayoutParams(lp);
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче