Bug 681805 - Move forward button styling to style files. r=lucasr

This commit is contained in:
Wes Johnston 2012-12-19 09:28:59 -08:00
parent c8efd88c1a
commit 6d756ae92c
11 changed files with 60 additions and 68 deletions

View File

@ -16,9 +16,8 @@
android:contentDescription="@string/back"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton android:id="@+id/forward"
android:contentDescription="@string/forward"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton style="@style/AddressBar.ImageButton.Forward"
android:id="@+id/forward"/>
<org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
android:layout_width="fill_parent"
@ -28,12 +27,8 @@
android:layout_alignParentRight="true"
android:background="@drawable/address_bar_bg"/>
<FrameLayout style="@style/AddressBar.Button"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true">
<FrameLayout style="@style/AddressBar.Button.Container"
android:id="@+id/addressbar">
<Gecko.RelativeLayout android:id="@+id/awesome_bar"
style="@style/AddressBar.Button"

View File

@ -16,9 +16,8 @@
android:contentDescription="@string/back"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton android:id="@+id/forward"
android:contentDescription="@string/forward"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton style="@style/AddressBar.ImageButton.Forward"
android:id="@+id/forward"/>
<org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
android:layout_width="fill_parent"
@ -28,12 +27,8 @@
android:layout_alignParentRight="true"
android:background="@drawable/address_bar_bg"/>
<FrameLayout style="@style/AddressBar.Button"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true">
<FrameLayout style="@style/AddressBar.Button.Container"
android:id="@+id/addressbar">
<Gecko.RelativeLayout android:id="@+id/awesome_bar"
style="@style/AddressBar.Button"

View File

@ -69,16 +69,8 @@
</Gecko.RelativeLayout>
<org.mozilla.gecko.ForwardButton android:id="@+id/forward"
style="@style/AddressBar.ImageButton"
android:layout_width="64dip"
android:layout_height="42dip"
android:layout_marginLeft="21dp"
android:paddingLeft="21dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_menu_forward"
android:contentDescription="@string/forward"
android:background="@drawable/address_bar_nav_button"/>
<org.mozilla.gecko.ForwardButton style="@style/AddressBar.ImageButton.Forward"
android:id="@+id/forward"/>
<org.mozilla.gecko.BackButton android:id="@+id/back"
style="@style/AddressBar.ImageButton"
@ -90,12 +82,8 @@
android:contentDescription="@string/back"
android:background="@drawable/address_bar_nav_button"/>
<LinearLayout style="@style/AddressBar.Button"
android:layout_marginLeft="90dp"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
android:layout_marginRight="0dp"
android:orientation="horizontal">
<LinearLayout style="@style/AddressBar.Button.Container"
android:id="@+id/addressbar">
<ImageButton android:id="@+id/favicon"
style="@style/AddressBar.ImageButton"

View File

@ -104,16 +104,8 @@
</Gecko.RelativeLayout>
<org.mozilla.gecko.ForwardButton android:id="@+id/forward"
style="@style/AddressBar.ImageButton"
android:layout_width="64dip"
android:layout_height="42dip"
android:layout_marginLeft="22dp"
android:paddingLeft="22dp"
android:layout_centerVertical="true"
android:src="@drawable/ic_menu_forward"
android:contentDescription="@string/forward"
android:background="@drawable/address_bar_nav_button"/>
<org.mozilla.gecko.ForwardButton style="@style/AddressBar.ImageButton.Forward"
android:id="@+id/forward"/>
<org.mozilla.gecko.BackButton android:id="@+id/back"
style="@style/AddressBar.ImageButton"
@ -124,12 +116,8 @@
android:contentDescription="@string/back"
android:background="@drawable/address_bar_nav_button"/>
<LinearLayout style="@style/AddressBar.Button"
android:layout_marginLeft="84dp"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
android:layout_marginRight="0dp"
android:orientation="horizontal">
<LinearLayout style="@style/AddressBar.Button.Container"
android:id="@+id/addressbar">
<ImageButton android:id="@+id/favicon"
style="@style/AddressBar.ImageButton"

View File

@ -16,9 +16,8 @@
android:contentDescription="@string/back"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton android:id="@+id/forward"
android:contentDescription="@string/forward"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton style="@style/AddressBar.ImageButton.Forward"
android:id="@+id/forward"/>
<org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
android:layout_width="fill_parent"
@ -28,12 +27,8 @@
android:layout_alignParentRight="true"
android:background="@drawable/address_bar_bg"/>
<FrameLayout style="@style/AddressBar.Button"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true">
<FrameLayout style="@style/AddressBar.Button.Container"
android:id="@+id/addressbar">
<Gecko.RelativeLayout android:id="@+id/awesome_bar"
style="@style/AddressBar.Button"

View File

@ -16,9 +16,8 @@
android:contentDescription="@string/back"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton android:id="@+id/forward"
android:contentDescription="@string/forward"
style="@style/AddressBar.ImageButton.Unused"/>
<ImageButton style="@style/AddressBar.ImageButton.Forward"
android:id="@+id/forward"/>
<org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
android:layout_width="fill_parent"
@ -28,12 +27,8 @@
android:layout_alignParentRight="true"
android:background="@drawable/address_bar_bg"/>
<FrameLayout style="@style/AddressBar.Button"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true">
<FrameLayout style="@style/AddressBar.Button.Container"
android:id="@+id/addressbar">
<Gecko.RelativeLayout android:id="@+id/awesome_bar"
style="@style/AddressBar.Button"

View File

@ -9,5 +9,6 @@
<dimen name="browser_toolbar_icon_width">45dp</dimen>
<dimen name="menu_popup_arrow_margin">8dip</dimen>
<dimen name="tabs_counter_size">26sp</dimen>
<dimen name="addressbar_offset_left">90dp</dimen>
</resources>

View File

@ -31,4 +31,24 @@
<item name="android:paddingRight">60dip</item>
</style>
<style name="AddressBar.ImageButton.Forward">
<item name="android:contentDescription">@string/forward</item>
<item name="android:layout_width">64dip</item>
<item name="android:layout_height">42dip</item>
<item name="android:layout_marginLeft">21dp</item>
<item name="android:paddingLeft">21dp</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:src">@drawable/ic_menu_forward</item>
<item name="android:background">@drawable/address_bar_nav_button</item>
</style>
<style name="AddressBar.Button.Container">
<item name="android:layout_marginTop">6dp</item>
<item name="android:layout_marginBottom">6dp</item>
<item name="android:layout_marginRight">0dp</item>
<item name="android:layout_marginLeft">@dimen/addressbar_offset_left</item>
<item name="android:orientation">horizontal</item>
</style>
</resources>

View File

@ -16,5 +16,6 @@
<dimen name="remote_tab_child_row_height">48dp</dimen>
<dimen name="remote_tab_group_row_height">28dp</dimen>
<dimen name="tabs_counter_size">26sp</dimen>
<dimen name="addressbar_offset_left">84dip</dimen>
</resources>

View File

@ -53,6 +53,7 @@
<dimen name="validation_message_margin_top">6dp</dimen>
<dimen name="widget_padding">8dp</dimen>
<dimen name="addressbar_offset_left">84dip</dimen>
<dimen name="app_defaultsize_w">632.0dip</dimen>
<dimen name="app_defaultsize_h">598.0dip</dimen>
<dimen name="app_minimumsize_w">632.0dip</dimen>

View File

@ -65,6 +65,15 @@
<item name="android:background">@android:color/transparent</item>
</style>
<style name="AddressBar.Button.Container">
<item name="android:layout_marginLeft">4dp</item>
<item name="android:layout_marginRight">4dp</item>
<item name="android:layout_toLeftOf">@id/menu_items</item>
<item name="android:layout_alignParentLeft">true</item>
<item name="android:layout_alignParentBottom">true</item>
<item name="android:layout_centerVertical">true</item>
</style>
<!-- Address bar - Image Button -->
<style name="AddressBar.ImageButton" parent="AddressBar.Button">
<item name="android:scaleType">center</item>
@ -79,6 +88,10 @@
<item name="android:visibility">gone</item>
</style>
<style name="AddressBar.ImageButton.Forward" parent="AddressBar.ImageButton.Unused">
<item name="android:contentDescription">@string/forward</item>
</style>
<!-- Address bar - Image Button - Icon -->
<style name="AddressBar.ImageButton.Icon">
<item name="android:layout_width">@dimen/browser_toolbar_icon_width</item>