Bug 863379: Update tab icon. [r=mfinkle]

This commit is contained in:
Sriram Ramasubramanian 2013-04-18 15:36:08 -07:00
parent 965cf63bbc
commit e329a9383b
20 changed files with 35 additions and 57 deletions

View File

@ -907,7 +907,6 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
public void setIsSideBar(boolean isSideBar) {
Resources resources = mActivity.getResources();
mTabs.setImageDrawable(resources.getDrawable(R.drawable.tabs_level));
mTabs.setBackgroundDrawable(resources.getDrawable(R.drawable.shaped_button));
}

View File

@ -597,7 +597,7 @@ RES_DRAWABLE_MDPI = \
res/drawable-mdpi/tab_close.png \
res/drawable-mdpi/tab_thumbnail_default.png \
res/drawable-mdpi/tab_thumbnail_shadow.png \
res/drawable-mdpi/tabs_carat.png \
res/drawable-mdpi/tabs_count.png \
res/drawable-mdpi/address_bar_url_default.9.png \
res/drawable-mdpi/address_bar_url_default_pb.9.png \
res/drawable-mdpi/address_bar_url_pressed.9.png \
@ -695,7 +695,7 @@ RES_DRAWABLE_HDPI = \
res/drawable-hdpi/tab_close.png \
res/drawable-hdpi/tab_thumbnail_default.png \
res/drawable-hdpi/tab_thumbnail_shadow.png \
res/drawable-hdpi/tabs_carat.png \
res/drawable-hdpi/tabs_count.png \
res/drawable-hdpi/address_bar_url_default.9.png \
res/drawable-hdpi/address_bar_url_default_pb.9.png \
res/drawable-hdpi/address_bar_url_pressed.9.png \
@ -782,7 +782,7 @@ RES_DRAWABLE_XHDPI = \
res/drawable-xhdpi/tab_close.png \
res/drawable-xhdpi/tab_thumbnail_default.png \
res/drawable-xhdpi/tab_thumbnail_shadow.png \
res/drawable-xhdpi/tabs_carat.png \
res/drawable-xhdpi/tabs_count.png \
res/drawable-xhdpi/doorhanger_popup_bg.9.png \
res/drawable-xhdpi/find_close.png \
res/drawable-xhdpi/find_next.png \
@ -893,18 +893,11 @@ RES_DRAWABLE_XHDPI_V11 = \
res/drawable-xhdpi-v11/ic_status_logo.png \
$(NULL)
RES_DRAWABLE_LARGE_LAND_V11 = \
res/drawable-large-land-v11/tabs_level.xml \
$(NULL)
RES_DRAWABLE_LARGE_MDPI_V11 = \
res/drawable-large-mdpi-v11/doorhanger_popup_bg.9.png \
res/drawable-large-mdpi-v11/ic_menu_reload.png \
res/drawable-large-mdpi-v11/ic_menu_forward.png \
res/drawable-large-mdpi-v11/menu.png \
res/drawable-large-mdpi-v11/tabs_carat.png \
res/drawable-large-mdpi-v11/tabs_carat_contracted.png \
res/drawable-large-mdpi-v11/tabs_carat_expanded.png \
$(NULL)
RES_DRAWABLE_LARGE_HDPI_V11 = \
@ -912,9 +905,6 @@ RES_DRAWABLE_LARGE_HDPI_V11 = \
res/drawable-large-hdpi-v11/ic_menu_reload.png \
res/drawable-large-hdpi-v11/ic_menu_forward.png \
res/drawable-large-hdpi-v11/menu.png \
res/drawable-large-hdpi-v11/tabs_carat.png \
res/drawable-large-hdpi-v11/tabs_carat_contracted.png \
res/drawable-large-hdpi-v11/tabs_carat_expanded.png \
$(NULL)
RES_DRAWABLE_LARGE_XHDPI_V11 = \
@ -922,9 +912,6 @@ RES_DRAWABLE_LARGE_XHDPI_V11 = \
res/drawable-large-xhdpi-v11/ic_menu_reload.png \
res/drawable-large-xhdpi-v11/ic_menu_forward.png \
res/drawable-large-xhdpi-v11/menu.png \
res/drawable-large-xhdpi-v11/tabs_carat.png \
res/drawable-large-xhdpi-v11/tabs_carat_contracted.png \
res/drawable-large-xhdpi-v11/tabs_carat_expanded.png \
$(NULL)
RES_DRAWABLE_XLARGE_MDPI_V11 = \
@ -1025,7 +1012,6 @@ MOZ_ANDROID_DRAWABLES += \
mobile/android/base/resources/drawable/tab_new_level.xml \
mobile/android/base/resources/drawable/tab_row.xml \
mobile/android/base/resources/drawable/tab_thumbnail.xml \
mobile/android/base/resources/drawable/tabs_level.xml \
mobile/android/base/resources/drawable/tabs_panel_indicator.xml \
mobile/android/base/resources/drawable/textbox_bg.xml \
mobile/android/base/resources/drawable/webapp_titlebar_bg.xml \
@ -1033,7 +1019,7 @@ MOZ_ANDROID_DRAWABLES += \
MOZ_BRANDING_DRAWABLE_MDPI = $(shell if test -e $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources.mn; then cat $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources.mn | tr '\n' ' '; fi)
RESOURCES=$(RES_LAYOUT) $(RES_LAYOUT_LARGE_LAND_V11) $(RES_LAYOUT_LARGE_V11) $(RES_LAYOUT_XLARGE_V11) $(RES_LAYOUT_XLARGE_LAND_V11) $(RES_VALUES) $(RES_VALUES_LAND) $(RES_VALUES_V11) $(RES_VALUES_LARGE_V11) $(RES_VALUES_LARGE_LAND_V11) $(RES_VALUES_XLARGE_V11) $(RES_VALUES_LAND_V14) $(RES_VALUES_V14) $(RES_XML) $(RES_ANIM) $(RES_DRAWABLE_MDPI) $(RES_DRAWABLE_LDPI) $(RES_DRAWABLE_HDPI) $(RES_DRAWABLE_XHDPI) $(RES_DRAWABLE_MDPI_V11) $(RES_DRAWABLE_HDPI_V11) $(RES_DRAWABLE_XHDPI_V11) $(RES_DRAWABLE_LARGE_LAND_V11) $(RES_DRAWABLE_LARGE_MDPI_V11) $(RES_DRAWABLE_LARGE_HDPI_V11) $(RES_DRAWABLE_LARGE_XHDPI_V11) $(RES_DRAWABLE_XLARGE_MDPI_V11) $(RES_DRAWABLE_XLARGE_HDPI_V11) $(RES_DRAWABLE_XLARGE_XHDPI_V11) $(RES_COLOR) $(RES_MENU)
RESOURCES=$(RES_LAYOUT) $(RES_LAYOUT_LARGE_LAND_V11) $(RES_LAYOUT_LARGE_V11) $(RES_LAYOUT_XLARGE_V11) $(RES_LAYOUT_XLARGE_LAND_V11) $(RES_VALUES) $(RES_VALUES_LAND) $(RES_VALUES_V11) $(RES_VALUES_LARGE_V11) $(RES_VALUES_LARGE_LAND_V11) $(RES_VALUES_XLARGE_V11) $(RES_VALUES_LAND_V14) $(RES_VALUES_V14) $(RES_XML) $(RES_ANIM) $(RES_DRAWABLE_MDPI) $(RES_DRAWABLE_LDPI) $(RES_DRAWABLE_HDPI) $(RES_DRAWABLE_XHDPI) $(RES_DRAWABLE_MDPI_V11) $(RES_DRAWABLE_HDPI_V11) $(RES_DRAWABLE_XHDPI_V11) $(RES_DRAWABLE_LARGE_MDPI_V11) $(RES_DRAWABLE_LARGE_HDPI_V11) $(RES_DRAWABLE_LARGE_XHDPI_V11) $(RES_DRAWABLE_XLARGE_MDPI_V11) $(RES_DRAWABLE_XLARGE_HDPI_V11) $(RES_DRAWABLE_XLARGE_XHDPI_V11) $(RES_COLOR) $(RES_MENU)
RES_DIRS= \
res/layout \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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/. -->
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@android:color/transparent"/>
<item android:maxLevel="1" android:drawable="@drawable/tabs_carat_contracted"/>
<item android:maxLevel="2" android:drawable="@drawable/tabs_carat_expanded"/>
</level-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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/. -->
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@android:color/transparent"/>
<item android:maxLevel="2" android:drawable="@drawable/tabs_carat"/>
</level-list>

View File

@ -22,15 +22,22 @@
gecko:curveTowards="left"
android:background="@drawable/shaped_button"
android:gravity="center_vertical"
android:src="@drawable/tabs_level"
android:paddingLeft="6dip"
android:paddingRight="38dip"/>
<!-- The TextSwitcher should be shifted 28dp on the right, to avoid
the curve. On a 56dp space, centering 24dp image will leave
16dp on all sides. However this image has a perception of
2 layers. Hence to center this, an additional 4dp is added to the right.
The margins will be 12dp on left, 48dp on right, instead of ideal 16dp
and 44dp. -->
<Gecko.TextSwitcher android:id="@+id/tabs_count"
style="@style/AddressBar.ImageButton"
android:layout_width="52dip"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_marginLeft="12dip"
android:layout_marginRight="48dip"
android:layout_marginTop="16dp"
android:layout_alignLeft="@id/tabs"
android:gravity="center_horizontal"/>

View File

@ -71,15 +71,22 @@
gecko:curveTowards="right"
android:background="@drawable/shaped_button"
android:gravity="center_vertical"
android:src="@drawable/tabs_level"
android:paddingLeft="37dip"
android:paddingRight="11dip"/>
<!-- The TextSwitcher should be shifted 24dp on the left, to avoid
the curve. On a 48dp space, centering 24dp image will leave
12dp on all sides. However this image has a perception of
2 layers. Hence to center this, an additional 4dp is added to the left.
The margins will be 40dp on left, 8dp on right, instead of ideal 30dp
and 12dp. -->
<Gecko.TextSwitcher android:id="@+id/tabs_count"
style="@style/AddressBar.ImageButton"
android:layout_width="44.5dip"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_marginLeft="40dip"
android:layout_marginRight="8dip"
android:layout_marginTop="12dip"
android:layout_alignRight="@id/tabs"
android:gravity="center_horizontal"/>

View File

@ -4,9 +4,14 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<Gecko.TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/tabs_counter_size"
android:textColor="#FFB5B7B9"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_margin="12dip"
android:paddingTop="2dip"
android:paddingLeft="4dip"
android:background="@drawable/tabs_count"
android:textAppearance="@style/TextAppearance.Micro"
android:textColor="#FF43484E"
android:textStyle="bold"
android:duplicateParentState="true"
android:gravity="center"/>