Bug 1010741 - Change text appearance in toolbar (r=mcomella)
☠☠ backed out by d18d3e14ac3e ☠ ☠
authorLucas Rocha <lucasr@mozilla.com>
Fri, 15 Aug 2014 18:23:16 +0100
changeset 199842 54179c9a121a3d23d3dbc5167fa6b1bcbf65ed52
parent 199841 4f430621992c83787aed08ffe8411841bb82d760
child 199843 cbb72f0aa5328b50dd8f2972c39d7015254a5719
push id47750
push userryanvm@gmail.com
push dateFri, 15 Aug 2014 21:04:12 +0000
treeherdermozilla-inbound@baea646f5a80 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1010741
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1010741 - Change text appearance in toolbar (r=mcomella)
mobile/android/base/resources/layout/toolbar_display_layout.xml
mobile/android/base/resources/layout/toolbar_edit_layout.xml
mobile/android/base/resources/values-large-v11/styles.xml
mobile/android/base/resources/values-large-v16/styles.xml
mobile/android/base/resources/values-v16/styles.xml
mobile/android/base/resources/values/styles.xml
--- a/mobile/android/base/resources/layout/toolbar_display_layout.xml
+++ b/mobile/android/base/resources/layout/toolbar_display_layout.xml
@@ -21,27 +21,21 @@
                  android:layout_width="@dimen/browser_toolbar_lock_width"
                  android:scaleType="fitCenter"
                  android:layout_marginLeft="-4dip"
                  android:src="@drawable/site_security_level"
                  android:contentDescription="@string/site_security"
                  android:visibility="gone"/>
 
     <org.mozilla.gecko.widget.ThemedTextView android:id="@+id/url_bar_title"
-                                             style="@style/UrlBar.Button"
+                                             style="@style/UrlBar.Title"
                                              android:layout_width="match_parent"
                                              android:layout_height="match_parent"
                                              android:layout_weight="1.0"
-                                             android:singleLine="true"
                                              android:paddingRight="8dp"
-                                             android:textColor="@color/url_bar_title"
-                                             android:textColorHint="@color/url_bar_title_hint"
-                                             android:gravity="center_vertical|left"
-                                             android:hint="@string/url_bar_default_text"
-                                             android:layout_gravity="center_vertical"
                                              gecko:autoUpdateTheme="false"/>
 
     <org.mozilla.gecko.toolbar.PageActionLayout android:id="@+id/page_action_layout"
                                                 android:layout_width="wrap_content"
                                                 android:layout_height="match_parent"
                                                 android:layout_marginRight="@dimen/browser_toolbar_button_padding"
                                                 android:visibility="gone"
                                                 android:orientation="horizontal"/>
--- a/mobile/android/base/resources/layout/toolbar_edit_layout.xml
+++ b/mobile/android/base/resources/layout/toolbar_edit_layout.xml
@@ -3,28 +3,18 @@
    - 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/. -->
 
 <merge xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:gecko="http://schemas.android.com/apk/res-auto">
 
     <org.mozilla.gecko.toolbar.ToolbarEditText
           android:id="@+id/url_edit_text"
-          style="@style/UrlBar.Button"
+          style="@style/UrlBar.Title"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:layout_weight="1.0"
-          android:hint="@string/url_bar_default_text"
-          android:textColor="@color/url_bar_title"
-          android:textColorHint="@color/url_bar_title_hint"
-          android:textColorHighlight="@color/url_bar_text_highlight"
-          android:textSelectHandle="@drawable/handle_middle"
-          android:textSelectHandleLeft="@drawable/handle_start"
-          android:textSelectHandleRight="@drawable/handle_end"
-          android:textCursorDrawable="@null"
           android:inputType="textUri|textNoSuggestions"
           android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
           android:selectAllOnFocus="true"
-          android:singleLine="true"
-          android:gravity="center_vertical|left"
           gecko:autoUpdateTheme="false"/>
 
 </merge>
--- a/mobile/android/base/resources/values-large-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-v11/styles.xml
@@ -120,9 +120,13 @@
     </style>
 
     <style name="TabsPanelItem.TextAppearance.Linkified.LearnMore">
         <item name="android:layout_height">match_parent</item>
         <item name="android:gravity">center</item>
         <item name="android:layout_gravity">center</item>
     </style>
 
+    <style name="TextAppearance.UrlBar.Title" parent="TextAppearance.Medium">
+        <item name="android:textSize">16sp</item>
+    </style>
+
 </resources>
copy from mobile/android/base/resources/values-v16/styles.xml
copy to mobile/android/base/resources/values-large-v16/styles.xml
--- a/mobile/android/base/resources/values-v16/styles.xml
+++ b/mobile/android/base/resources/values-large-v16/styles.xml
@@ -1,20 +1,13 @@
 <?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/. -->
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
-    <style name="TextAppearance.EmptyMessage" parent="TextAppearance.Large">
-        <item name="android:fontFamily">sans-serif-light</item>
-    </style>
-
-    <style name="TextAppearance.Widget.Home.ItemTitle" parent="TextAppearance.Medium">
-        <item name="android:fontFamily">sans-serif-light</item>
-    </style>
-
-    <style name="TextAppearance.Widget.Home.PageTitle" parent="TextAppearance.Medium">
+    <style name="TextAppearance.UrlBar.Title" parent="TextAppearance.Small">
+        <item name="android:textSize">16sp</item>
         <item name="android:fontFamily">sans-serif-light</item>
     </style>
 
 </resources>
--- a/mobile/android/base/resources/values-v16/styles.xml
+++ b/mobile/android/base/resources/values-v16/styles.xml
@@ -12,9 +12,14 @@
     <style name="TextAppearance.Widget.Home.ItemTitle" parent="TextAppearance.Medium">
         <item name="android:fontFamily">sans-serif-light</item>
     </style>
 
     <style name="TextAppearance.Widget.Home.PageTitle" parent="TextAppearance.Medium">
         <item name="android:fontFamily">sans-serif-light</item>
     </style>
 
+    <style name="TextAppearance.UrlBar.Title" parent="TextAppearance.Small">
+        <item name="android:textSize">15sp</item>
+        <item name="android:fontFamily">sans-serif-light</item>
+    </style>
+
 </resources>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -383,16 +383,20 @@
         <item name="android:textColorLink">@color/doorhanger_link</item>
     </style>
 
     <style name="TextAppearance.Widget.DoorHanger.Small" parent="TextAppearance.Small">
         <item name="android:textColor">@color/doorhanger_text</item>
         <item name="android:textColorLink">@color/doorhanger_link</item>
     </style>
 
+    <style name="TextAppearance.UrlBar.Title" parent="TextAppearance.Small">
+        <item name="android:textSize">15sp</item>
+    </style>
+
     <!-- BrowserToolbar -->
     <style name="BrowserToolbar">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">@dimen/browser_toolbar_height</item>
         <item name="android:orientation">horizontal</item>
     </style>
 
     <style name="UrlBar.ImageButton.TabCount">
@@ -407,20 +411,34 @@
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">match_parent</item>
         <item name="android:orientation">horizontal</item>
     </style>
 
     <!-- URL bar - Button -->
     <style name="UrlBar.Button">
         <item name="android:layout_height">match_parent</item>
-        <item name="android:textSize">16sp</item>
         <item name="android:background">@android:color/transparent</item>
     </style>
 
+    <!-- URL bar - Button -->
+    <style name="UrlBar.Title" parent="UrlBar.Button">
+        <item name="android:textAppearance">@style/TextAppearance.UrlBar.Title</item>
+        <item name="android:textColor">@color/url_bar_title</item>
+        <item name="android:textColorHint">@color/url_bar_title_hint</item>
+        <item name="android:textColorHighlight">@color/url_bar_text_highlight</item>
+        <item name="android:textSelectHandle">@drawable/handle_middle</item>
+        <item name="android:textSelectHandleLeft">@drawable/handle_start</item>
+        <item name="android:textSelectHandleRight">@drawable/handle_end</item>
+        <item name="android:textCursorDrawable">@null</item>
+        <item name="android:singleLine">true</item>
+        <item name="android:gravity">center_vertical|left</item>
+        <item name="android:hint">@string/url_bar_default_text</item>
+    </style>
+
     <!-- URL bar - Image Button -->
     <style name="UrlBar.ImageButton" parent="UrlBar.Button">
         <item name="android:scaleType">center</item>
         <item name="android:layout_gravity">center_vertical</item>
         <item name="android:background">@android:color/transparent</item>
     </style>
 
     <!-- URL bar - Image Button - Unused -->