Bug 943513 - Update visual style of action modes. r=lucasr
authorWes Johnston <wjohnston@mozilla.com>
Wed, 04 Dec 2013 08:35:58 -0800
changeset 168029 d379a9103c5bebe8bc12b4b2b6212e31d0e9b072
parent 168028 fe80b1695a66063ae1eb301986b6a1518cff10ce
child 168030 4d64a37dac18a50e04b9c5fb4efb9a4134e4368e
push id4703
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 20:24:19 +0000
treeherdermozilla-aurora@20af7fbd96c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs943513
milestone28.0a1
Bug 943513 - Update visual style of action modes. r=lucasr
mobile/android/base/ActionModeCompatView.java
mobile/android/base/BrowserApp.java
mobile/android/base/TextSelection.java
mobile/android/base/animation/AnimationUtils.java
mobile/android/base/gfx/LayerMarginsAnimator.java
mobile/android/base/menu/GeckoMenuItem.java
mobile/android/base/moz.build
mobile/android/base/resources/drawable-hdpi/ab_stacked_transparent_light_holo.9.png
mobile/android/base/resources/drawable-hdpi/ic_menu_share.png
mobile/android/base/resources/drawable-mdpi/ab_stacked_transparent_light_holo.9.png
mobile/android/base/resources/drawable-mdpi/ic_menu_share.png
mobile/android/base/resources/drawable-mdpi/select_all.png
mobile/android/base/resources/drawable-xhdpi/ab_stacked_transparent_light_holo.9.png
mobile/android/base/resources/drawable-xhdpi/ic_menu_share.png
mobile/android/base/resources/layout/actionbar.xml
mobile/android/base/resources/layout/gecko_app.xml
mobile/android/base/resources/values-v11/styles.xml
mobile/android/base/resources/values-v11/themes.xml
mobile/android/base/resources/values/attrs.xml
mobile/android/base/resources/values/styles.xml
mobile/android/base/resources/values/themes.xml
--- a/mobile/android/base/ActionModeCompatView.java
+++ b/mobile/android/base/ActionModeCompatView.java
@@ -1,20 +1,24 @@
 /* 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;
 
+import org.mozilla.gecko.animation.AnimationUtils;
 import org.mozilla.gecko.menu.GeckoMenu;
 import org.mozilla.gecko.menu.MenuPopup;
 import org.mozilla.gecko.menu.MenuPanel;
 import org.mozilla.gecko.menu.MenuItemActionBar;
 import org.mozilla.gecko.widget.GeckoPopupMenu;
 
+import android.view.animation.Animation;
+import android.view.animation.TranslateAnimation;
+import android.view.animation.ScaleAnimation;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.MenuInflater;
 import android.view.ViewGroup;
 import android.view.LayoutInflater;
 import android.widget.LinearLayout;
 import android.view.View;
 import android.view.ViewGroup;
@@ -151,9 +155,23 @@ class ActionModeCompatView extends Linea
     public void openMenu() {
         mPopupMenu.openMenu();
     }
 
     public void closeMenu() {
         mPopupMenu.dismiss();
     }
 
+    public void animateIn() {
+        long duration = AnimationUtils.getShortDuration(getContext());
+        TranslateAnimation t = new TranslateAnimation(Animation.RELATIVE_TO_SELF, -0.5f, Animation.RELATIVE_TO_SELF, 0f,
+                                                      Animation.RELATIVE_TO_SELF,  0f,   Animation.RELATIVE_TO_SELF, 0f);
+        t.setDuration(duration);
+
+        ScaleAnimation s = new ScaleAnimation(1f, 1f, 0f, 1f,
+                                              Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
+        s.setDuration((long) (duration * 1.5f));
+
+        mTitleView.startAnimation(t);
+        mActionButtonBar.startAnimation(s);
+        mMenuButton.startAnimation(s);
+    }
 }
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -2534,19 +2534,27 @@ abstract public class BrowserApp extends
 
     /* Implementing ActionModeCompat.Presenter */
     @Override
     public void startActionModeCompat(final ActionModeCompat.Callback callback) {
         // If actionMode is null, we're not currently showing one. Flip to the action mode view
         if (mActionMode == null) {
             mViewFlipper.showNext();
             LayerMarginsAnimator margins = mLayerView.getLayerMarginsAnimator();
-            margins.setMaxMargins(0, mViewFlipper.getHeight(), 0, 0);
+
+            // If the toolbar is dynamic and not currently showing, just slide it in
+            if (isDynamicToolbarEnabled() && !margins.areMarginsShown()) {
+                margins.setMaxMargins(0, mViewFlipper.getHeight(), 0, 0);
+                margins.showMargins(false);
+            } else {
+                // Otherwise, we animate the actionbar itself
+                mActionBar.animateIn();
+            }
+
             margins.setMarginsPinned(true);
-            margins.showMargins(false);
         } else {
             // Otherwise, we're already showing an action mode. Just finish it and show the new one
             mActionMode.finish();
         }
 
         mActionMode = new ActionModeCompat(BrowserApp.this, callback, mActionBar);
         if (callback.onCreateActionMode(mActionMode, mActionMode.getMenu())) {
             mActionMode.invalidate();
--- a/mobile/android/base/TextSelection.java
+++ b/mobile/android/base/TextSelection.java
@@ -241,17 +241,17 @@ class TextSelection extends Layer implem
             // action mode.
             menu.clear();
 
             int length = mItems.length();
             for (int i = 0; i < length; i++) {
                 try {
                     final JSONObject obj = mItems.getJSONObject(i);
                     final GeckoMenuItem menuitem = (GeckoMenuItem) menu.add(0, i, 0, obj.optString("label"));
-                    menuitem.setShowAsAction(obj.optBoolean("showAsAction") ? 1 : 0);
+                    menuitem.setShowAsAction(obj.optBoolean("showAsAction") ? 1 : 0, R.attr.menuItemActionModeStyle);
 
                     BitmapUtils.getDrawable(mStartHandle.getContext(), obj.optString("icon"), new BitmapLoader() {
                         public void onBitmapFound(Drawable d) {
                             if (d != null) {
                                 menuitem.setIcon(d);
                             }
                         }
                     });
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/animation/AnimationUtils.java
@@ -0,0 +1,21 @@
+/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; 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.animation;
+
+import android.content.Context;
+
+public class AnimationUtils {
+    private static long mShortDuration;
+
+    public static long getShortDuration(Context context) {
+        if (mShortDuration < 0) {
+            mShortDuration = context.getResources().getInteger(android.R.integer.config_shortAnimTime);
+        }
+        return mShortDuration;
+    }
+}
+
--- a/mobile/android/base/gfx/LayerMarginsAnimator.java
+++ b/mobile/android/base/gfx/LayerMarginsAnimator.java
@@ -134,16 +134,24 @@ public class LayerMarginsAnimator implem
     public void setMarginsPinned(boolean pin) {
         if (pin == mMarginsPinned) {
             return;
         }
 
         mMarginsPinned = pin;
     }
 
+    public boolean areMarginsShown() {
+        final ImmutableViewportMetrics metrics = mTarget.getViewportMetrics();
+        return metrics.marginLeft != 0  ||
+               metrics.marginRight != 0 ||
+               metrics.marginTop != 0   ||
+               metrics.marginBottom != 0;
+    }
+
     /**
      * This function will scroll a margin down to zero, or up to the maximum
      * specified margin size and return the left-over delta.
      * aMargins are in/out parameters. In specifies the current margin size,
      * and out specifies the modified margin size. They are specified in the
      * order of start-margin, then end-margin.
      * This function will also take into account how far the touch point has
      * moved and react accordingly. If a touch point hasn't moved beyond a
--- a/mobile/android/base/menu/GeckoMenuItem.java
+++ b/mobile/android/base/menu/GeckoMenuItem.java
@@ -285,28 +285,37 @@ public class GeckoMenuItem implements Me
 
     @Override
     public MenuItem setShortcut(char numericChar, char alphaChar) {
         return this;
     }
 
     @Override
     public void setShowAsAction(int actionEnum) {
+        setShowAsAction(actionEnum, 0);
+    }
+
+    public void setShowAsAction(int actionEnum, int style) {
         if (mShowAsActionChangedListener == null)
             return;
 
         if (mActionItem == (actionEnum > 0))
             return;
 
         if (actionEnum > 0) {
             if (!mShowAsActionChangedListener.hasActionItemBar())
                 return;
 
             // Change the type to just an icon
-            MenuItemActionBar actionView = new MenuItemActionBar(mMenu.getContext(), null);
+            MenuItemActionBar actionView;
+            if (style != 0) {
+                actionView = new MenuItemActionBar(mMenu.getContext(), null, style);
+            } else {
+                actionView = new MenuItemActionBar(mMenu.getContext());
+            }
             actionView.initialize(this);
             mActionView = actionView;
 
             mActionItem = (actionEnum > 0);
         }
 
         mShowAsActionChangedListener.onShowAsActionChanged(this, mActionItem);
     }
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -88,16 +88,17 @@ if CONFIG['MOZ_WEBRTC']:
 
 gbjar = add_java_jar('gecko-browser')
 gbjar.sources += [
     'AboutPages.java',
     'ActionModeCompat.java',
     'ActionModeCompatView.java',
     'ActivityHandlerHelper.java',
     'AlertNotification.java',
+    'animation/AnimationUtils.java',
     'animation/AnimatorProxy.java',
     'animation/HeightChangeAnimation.java',
     'animation/PropertyAnimator.java',
     'animation/Rotate3DAnimation.java',
     'animation/ViewHelper.java',
     'ANRReporter.java',
     'AppNotificationClient.java',
     'BaseGeckoInterface.java',
@@ -636,16 +637,17 @@ ANDROID_RESFILES += [
     'resources/drawable-mdpi/pin.png',
     'resources/drawable-mdpi/play.png',
     'resources/drawable-mdpi/progress_spinner.png',
     'resources/drawable-mdpi/reader.png',
     'resources/drawable-mdpi/reader_active.png',
     'resources/drawable-mdpi/reader_cropped.png',
     'resources/drawable-mdpi/reading_list.png',
     'resources/drawable-mdpi/scrollbar.png',
+    'resources/drawable-mdpi/select_all.png',
     'resources/drawable-mdpi/shadow.png',
     'resources/drawable-mdpi/shield.png',
     'resources/drawable-mdpi/shield_doorhanger.png',
     'resources/drawable-mdpi/spinner_default.9.png',
     'resources/drawable-mdpi/spinner_focused.9.png',
     'resources/drawable-mdpi/spinner_pressed.9.png',
     'resources/drawable-mdpi/start.png',
     'resources/drawable-mdpi/tab_close.png',
index 55f8ae5a633f19ce0bb45c19619f5d1206a000b8..844a544bb745db8ab556623040cd4a6982125d70
GIT binary patch
literal 230
zc%17D@N?(olHy`uVBq!ia0vp^Y9P$P1|(P5zFY^S7>k44ofy`glX(f`uqAoByD<C*
z!3BGlPX>x`7I;J!Gca%qgD@k*tT_@uLG}_)Usv|K+|puV1{=cU(t$#0o-U3d5r^Mi
z*~ob~frs_scb_QdE}e%Hjpt{JH-4Ee$;0*M=v{_K&P<{wLUI|cjJQvH{dw*sTb1qi
zoJf<zLoJ-bYCbazV2lka(a~XdBW$1c$~m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}1-!&(0>Dqa^8nq%
nI}KnX-dO-!@lFB+5fAVm;kbG%02mb<00000NkvXXu0mjfHdsCF
index 130d442b9cbc3aab9cf070078c3a99c311787004..e4650d4394ca68b54cacd66b059c5c0a2fd43ef0
GIT binary patch
literal 222
zc%17D@N?(olHy`uVBq!ia0vp^QXtI11|(N{`J4k%jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggqZfP+w(ceL*6o5i;o-U3d9>?Ea
zGvsP;5OBWelEccq{?XjMb6OR)-IvxmCl>8-iN9ZRSqEcivh;y%UrX;boO``4yEW(a
zBF|<ajerFXjZ9k=Zui_e@!u-e-}2>29nbR{pYMGgD{!Gf{5y9Mw>0yki+U4*HZgd*
L`njxgN@xNAJ_$=$
index 698b0e034c8102503f2795013cc0a5a68aca5a1d..8364e3e58e389840c2b4d74a68df83092dfa9e7a
GIT binary patch
literal 573
zc$@(}0>b@?P)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*%B
z03R4kiqaMU00F&8L_t(o!|m6<YZO5g2k_4ZK}3WI5=kL~2r-o)SHwa@%b*A%D3bp{
z@PDwdQL)!b#KJC3{8fo4;ZQ6jq83V!pd1ncBBJDMUSK$G*1Pp?xADOgJ8yQr-<^5y
z``#AaZda2wp<(+^pm74*dM8?~R@J@s;ye!G8=l}PwA<~$2~@P5xQxkop2h+;@vM$3
zIFf*;HeXi^?8(ee)<IwvhcmwSLkHmywjXD42&;I3xx~MYyW=1*g)?ZOgIib*-*e0a
z_%eP}C9n@Cu^aF32s>~J$717qk!HV>_uj^+t^;wTmy-CH#nB+Mi6uN7<m;*uIM*jQ
zr?7(C*ci7IPiNMyjv72iV67xBcGW@Pe%y6xUqj=s;54?6tr$fVU&ZkVybpMgWWhX6
zV6jgYjD!GujFH-}5SGWG0~aDy7ZV*g5GS>PSNQoi0!436I7B(_Rl?6bO4z}5bjr%{
zztn<H0dONua;{H-x>!dsTEXj#Z>Fwt+{w(Z*G1rE25hM`0E=Q|1is@M-bA*1!JVz1
zFb6)$o=||^9Ax1Zcq46jQ4|xUIxuGN=6+22f!9VL2VM(-GI00<K~G#KRl(;{00000
LNkvXXu0mjf5Tx=y
new file mode 100644
index 0000000000000000000000000000000000000000..e0dd67c69445979727fc9fdec76c60386524ba92
GIT binary patch
literal 166
zc%17D@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJTu&Frkch*{fByfsKkUGCERbEn
z`oNJRDa+Qc&;Rx8?Ceap`Ig0MvdfvJq@^?8J^uBp>X4#?_Gx$LhBX2VnTOIOHaT|&
zI+t+-TxMLXXduP3`00TQJdGD)Kukr0D88OE0umeQ4rW}>aj{}xIApN+Laee-KG0$Y
MPgg&ebxsLQ05jY>M*si-
index 28aeaa77b7fdfd3dde728b6f19956767fe230b51..a3fbaa1967762b720e845ee8c37bff727f6d55c5
GIT binary patch
literal 250
zc%17D@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-#^NA%Cx&(BWL^R}Y)RhkE)4%c
zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmP)x3rj;lJom~eV|a4r;B4q#=W<<
zHgYmK2)JC7H5BE^IW%eQ`5O)f^1{xSg)Q&pCse*Ey14Z18a>Z+HSP4JZ*AtS|2nHR
z_S|yIGir?u_`n~gPd}$_IO_Ij%fA)Lw|CxOXU4?zY44V~yz?IHVSKVqg0-`8{d}M+
O7(8A5T-G@yGywp<z+5>1
index be26fd0cec08ae708b4fcab739bd9c4f5493a0c0..bc07fde8b9590b633276ba233b43c15536c62d4d
GIT binary patch
literal 1033
zc$@(V1or!hP)<h;3K|Lk000e1NJLTq002M$002M;1^@s6s%dfF00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*%B
z03I-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!E%jE|!S09^O*gaT%({dT#=N0kZs=|A*~
zC+w4Cr%o!*NhzSdg<*VL0a%)lS9rC*VZ=TNE?wipFoIQsIvZaV9#G17?E!chuQdQa
z#%l|}ukl&}P%&OR0IJ4o1t5s=+5iY@ycPh;F&^L_KN+t_Ji&0-00000NkvXXu0mjf
DVS%q=
--- a/mobile/android/base/resources/layout/actionbar.xml
+++ b/mobile/android/base/resources/layout/actionbar.xml
@@ -10,17 +10,17 @@
             android:layout_width="wrap_content"
             style="@style/GeckoActionBar.Title"/>
 
     <!-- Draw a separator to the left of the title -->
     <View android:layout_height="fill_parent"
           android:layout_width="1dp"
           android:layout_marginTop="10dp"
           android:layout_marginBottom="10dp"
-          android:background="@android:color/darker_gray"/>
+          android:background="@color/text_color_secondary_inverse"/>
 
     <LinearLayout android:id="@+id/actionbar_buttons"
                   android:layout_height="fill_parent"
                   android:layout_width="0dip"
                   android:layout_weight="1"
                   style="@style/GeckoActionBar.Buttons"/>
 
     <ImageButton android:id="@+id/actionbar_menu"
--- a/mobile/android/base/resources/layout/gecko_app.xml
+++ b/mobile/android/base/resources/layout/gecko_app.xml
@@ -71,21 +71,21 @@
         <ViewFlipper android:id="@+id/browser_actionbar"
                 android:layout_width="fill_parent"
                 android:layout_height="@dimen/browser_toolbar_height"
                 android:clickable="true"
                 android:focusable="true">
 
             <org.mozilla.gecko.toolbar.BrowserToolbar
                 android:id="@id/browser_toolbar"
-                    style="@style/BrowserToolbar"
-                    android:layout_width="fill_parent"
-                    android:layout_height="@dimen/browser_toolbar_height"
-                    android:clickable="true"
-                    android:focusable="true"
+                style="@style/BrowserToolbar"
+                android:layout_width="fill_parent"
+                android:layout_height="@dimen/browser_toolbar_height"
+                android:clickable="true"
+                android:focusable="true"
                 android:background="@drawable/url_bar_bg"/>
 
             <org.mozilla.gecko.ActionModeCompatView android:id="@+id/actionbar"
                                                     android:layout_height="fill_parent"
                                                     android:layout_width="fill_parent"
                                                     style="@style/GeckoActionBar"/>
 
         </ViewFlipper>
--- a/mobile/android/base/resources/values-v11/styles.xml
+++ b/mobile/android/base/resources/values-v11/styles.xml
@@ -80,14 +80,18 @@
 
     <style name="GeckoActionBar.Title" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
         <item name="android:drawableLeft">?android:attr/actionModeCloseDrawable</item>
         <item name="android:background">@android:color/transparent</item>
         <item name="android:paddingLeft">15dp</item>
         <item name="android:paddingRight">15dp</item>
     </style>
 
+    <style name="GeckoActionBar.Button" parent="android:style/Widget.Holo.Light.ActionButton">
+        <item name="android:padding">12dp</item>
+    </style>
+
     <style name="GeckoActionBar.Button.MenuButton" parent="android:style/Widget.Holo.Light.ActionButton.Overflow">
         <item name="android:scaleType">center</item>
         <item name="android:background">@android:color/transparent</item>
     </style>
 
 </resources>
--- a/mobile/android/base/resources/values-v11/themes.xml
+++ b/mobile/android/base/resources/values-v11/themes.xml
@@ -43,11 +43,12 @@
         <item name="menuItemActionViewStyle">@style/Widget.MenuItemActionView</item>
         <item name="menuItemDefaultStyle">@style/Widget.MenuItemDefault</item>
         <item name="menuItemShareActionButtonStyle">@style/Widget.MenuItemShareActionButton</item>
         <item name="bookmarksListViewStyle">@style/Widget.BookmarksListView</item>
         <item name="topSitesGridItemViewStyle">@style/Widget.TopSitesGridItemView</item>
         <item name="topSitesGridViewStyle">@style/Widget.TopSitesGridView</item>
         <item name="topSitesThumbnailViewStyle">@style/Widget.TopSitesThumbnailView</item>
         <item name="homeListViewStyle">@style/Widget.HomeListView</item>
+        <item name="menuItemActionModeStyle">@style/GeckoActionBar.Button</item>
     </style>
 
 </resources>
--- a/mobile/android/base/resources/values/attrs.xml
+++ b/mobile/android/base/resources/values/attrs.xml
@@ -6,16 +6,19 @@
 <resources>
 
     <!-- Theme level attributes -->
     <declare-styleable name="GeckoTheme">
 
         <!-- Style for MenuItemActionBar -->
         <attr name="menuItemActionBarStyle" format="reference"/>
 
+        <!-- Style for MenuItemActionBar -->
+        <attr name="menuItemActionModeStyle" format="reference"/>
+
         <!-- Style for MenuItemActionView -->
         <attr name="menuItemActionViewStyle" format="reference"/>
 
         <!-- Style for MenuItemDefault -->
         <attr name="menuItemDefaultStyle" format="reference"/>
 
         <!-- Style for MenuItemActionView's ShareActionButton -->
         <attr name="menuItemShareActionButtonStyle" format="reference"/>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -551,18 +551,17 @@
         <item name="android:textAppearance">@style/TextAppearance.Medium</item>
         <item name="android:drawableLeft">@drawable/ab_done</item>
         <item name="android:paddingLeft">15dp</item>
         <item name="android:paddingRight">15dp</item>
         <item name="android:contentDescription">@string/actionbar_done</item>
     </style>
 
     <style name="GeckoActionBar.Button" parent="Widget.MenuItemActionBar">
-        <item name="android:background">@android:color/transparent</item>
-        <item name="android:gravity">center</item>
+        <item name="android:padding">8dp</item>
     </style>
 
     <style name="GeckoActionBar.Button.MenuButton">
         <item name="android:scaleType">center</item>
         <item name="android:src">@drawable/menu_light</item>
         <item name="android:contentDescription">@string/actionbar_menu</item>
         <item name="android:background">@android:color/transparent</item>
     </style>
--- a/mobile/android/base/resources/values/themes.xml
+++ b/mobile/android/base/resources/values/themes.xml
@@ -79,13 +79,14 @@
         <item name="android:spinnerStyle">@style/Widget.Spinner</item>
         <item name="bookmarksListViewStyle">@style/Widget.BookmarksListView</item>
         <item name="topSitesGridItemViewStyle">@style/Widget.TopSitesGridItemView</item>
         <item name="topSitesGridViewStyle">@style/Widget.TopSitesGridView</item>
         <item name="topSitesThumbnailViewStyle">@style/Widget.TopSitesThumbnailView</item>
         <item name="homeListViewStyle">@style/Widget.HomeListView</item>
         <item name="menuItemDefaultStyle">@style/Widget.MenuItemDefault</item>
         <item name="menuItemActionBarStyle">@style/Widget.MenuItemActionBar</item>
+        <item name="menuItemActionModeStyle">@style/GeckoActionBar.Button</item>
     </style>
 
     <style name="Gecko.Preferences" parent="GeckoPreferencesBase"/>
 
 </resources>