Bug 1050403 - Update widget style. r=margaret

This commit is contained in:
Wes Johnston 2014-08-15 11:04:36 -07:00
Родитель 5f9b815b9f
Коммит e8f465a4f5
21 изменённых файлов: 93 добавлений и 44 удалений

Двоичные данные
mobile/android/branding/aurora/res/drawable-xhdpi/widget_icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Двоичные данные
mobile/android/branding/beta/res/drawable-xhdpi/widget_icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Двоичные данные
mobile/android/branding/nightly/res/drawable-hdpi/widget_icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичные данные
mobile/android/branding/nightly/res/drawable-mdpi/widget_icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.1 KiB

Двоичные данные
mobile/android/branding/nightly/res/drawable-xhdpi/widget_icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 397 B

После

Ширина:  |  Высота:  |  Размер: 397 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 257 B

После

Ширина:  |  Высота:  |  Размер: 259 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.4 KiB

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Просмотреть файл

@ -5,25 +5,10 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:topLeftRadius="4dp"
android:topRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="@color/widget_button_pressed"/>
</shape>
</item>
<item android:state_pressed="true"
android:drawable="@drawable/widget_button_left_pressed"/>
<!-- The left button is gray in its off state -->
<item>
<shape android:shape="rectangle">
<corners android:topLeftRadius="4dp"
android:topRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="@color/widget_logo_highlight"/>
</shape>
</item>
<item android:drawable="@drawable/widget_button_left_default"/>
</selector>

Просмотреть файл

@ -0,0 +1,19 @@
<?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/. -->
<!-- These drawables have to be wrapped in a layer-list in order to produce padding at
the bottom of the drawable. That padding ensures the drawable doesn't block the
orange strip in widget_bg.9.png -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:bottom="@dimen/widget_bg_border_offset">
<shape android:shape="rectangle">
<corners android:topLeftRadius="@dimen/widget_drawable_corner_radius"
android:topRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="@color/widget_logo_default"/>
</shape>
</item>
</layer-list>

Просмотреть файл

@ -0,0 +1,19 @@
<?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/. -->
<!-- These drawables have to be wrapped in a layer-list in order to produce padding at
the bottom of the drawable. That padding ensures the drawable doesn't block the
orange strip in widget_bg.9.png -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:bottom="@dimen/widget_bg_border_offset">
<shape android:shape="rectangle">
<corners android:topLeftRadius="@dimen/widget_drawable_corner_radius"
android:topRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="@color/widget_button_pressed"/>
</shape>
</item>
</layer-list>

Просмотреть файл

@ -5,15 +5,8 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="@color/widget_button_pressed"/>
</shape>
</item>
<item android:state_pressed="true"
android:drawable="@drawable/widget_button_middle_pressed"/>
<item android:drawable="@android:color/transparent"/>

Просмотреть файл

@ -0,0 +1,15 @@
<?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/. -->
<!-- These drawables have to be wrapped in a layer-list in order to produce padding at
the bottom of the drawable. That padding ensures the drawable doesn't block the
orange strip in widget_bg.9.png -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:bottom="@dimen/widget_bg_border_offset">
<shape android:shape="rectangle">
<solid android:color="@color/widget_button_pressed"/>
</shape>
</item>
</layer-list>

Просмотреть файл

@ -5,15 +5,8 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:topLeftRadius="0dp"
android:topRightRadius="4dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="@color/widget_button_pressed"/>
</shape>
</item>
<item android:state_pressed="true"
android:drawable="@drawable/widget_button_right_pressed"/>
<item android:drawable="@android:color/transparent"/>

Просмотреть файл

@ -0,0 +1,19 @@
<?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/. -->
<!-- These drawables have to be wrapped in a layer-list in order to produce padding at
the bottom of the drawable. That padding ensures the drawable doesn't block the
orange strip in widget_bg.9.png -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:bottom="@dimen/widget_bg_border_offset">
<shape android:shape="rectangle">
<corners android:topLeftRadius="0dp"
android:topRightRadius="@dimen/widget_drawable_corner_radius"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="@color/widget_button_pressed"/>
</shape>
</item>
</layer-list>

Просмотреть файл

@ -15,9 +15,10 @@
<ImageView android:id="@+id/logo_button"
android:layout_width="0dp"
android:layout_weight="1"
android:padding="@dimen/widget_padding"
android:background="@drawable/widget_button_left"
android:layout_height="match_parent"
android:src="@drawable/icon"/>
android:src="@drawable/widget_icon"/>
<LinearLayout android:id="@+id/search_button"
android:layout_width="0dp"
@ -32,11 +33,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_widget_search"
android:drawablePadding="@dimen/widget_drawable_padding"
android:drawablePadding="@dimen/widget_padding"
android:text="@string/search_widget_button_label"
android:gravity="center"
android:fontFamily="sans-serif"
android:textSize="@dimen/widget_text_size"
android:textColor="@color/text_color_secondary"/>
android:textColor="@color/widget_text_color"/>
</LinearLayout>
@ -54,11 +56,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_widget_new_tab"
android:drawablePadding="@dimen/widget_drawable_padding"
android:drawablePadding="@dimen/widget_padding"
android:gravity="center"
android:text="@string/new_tab"
android:fontFamily="sans-serif"
android:textSize="@dimen/widget_text_size"
android:textColor="@color/text_color_secondary"/>
android:textColor="@color/widget_text_color"/>
</LinearLayout>

Просмотреть файл

@ -15,8 +15,9 @@
<color name="card_background_pressed">#DCDCE1</color>
<color name="card_border">#BFBFBF</color>
<color name="widget_logo_highlight">#11000000</color>
<color name="widget_logo_default">#EBEBF0</color>
<color name="widget_button_pressed">#33000000</color>
<color name="widget_text_color">#5F6368</color>
<!-- Search suggestion highlight color is defined in SearchFragment.java -->
</resources>

Просмотреть файл

@ -34,7 +34,9 @@
<dimen name="widget_header_height">70dp</dimen>
<dimen name="widget_button_offset">-50dp</dimen>
<dimen name="widget_button_padding">45dp</dimen>
<dimen name="widget_text_size">13sp</dimen>
<dimen name="widget_drawable_padding">4dp</dimen>
<dimen name="widget_text_size">14sp</dimen>
<dimen name="widget_padding">7dp</dimen>
<dimen name="widget_drawable_corner_radius">4dp</dimen>
<dimen name="widget_bg_border_offset">3dp</dimen>
</resources>