Bug 398445 - eliminate jitter when selecting new item in Applications prefpane. patch from Florian Queze <florian@mozilla.com>, r=me.
--- a/browser/components/preferences/handlers.css
+++ b/browser/components/preferences/handlers.css
@@ -38,29 +38,16 @@ richlistitem {
-moz-binding: url("chrome://browser/content/preferences/handlers.xml#handler");
}
richlistitem[selected="true"] {
-moz-binding: url("chrome://browser/content/preferences/handlers.xml#handler-selected");
}
/**
- * Somewhat line up the actions menu with action labels above and below it.
- * FIXME: to really line this up, equalize the distance from the left side
- * of the action box to the left side of the icon for both the menu and the
- * non-menu versions of the action box. Also make sure the labels are the
- * same distance away from the icons.
- */
-.actionsMenu {
- margin-left: 0;
-}
-
-/**
- * Make the icons appear and pad them a bit.
+ * Make the icons appear.
* Note: we display the icon box for every item whether or not it has an icon
* so the labels of all the items align vertically.
*/
.actionsMenu > menupopup > menuitem > .menu-iconic-left {
display: -moz-box;
min-width: 16px;
- -moz-padding-start: 2px;
- -moz-padding-end: 2px;
}
--- a/browser/components/preferences/handlers.xml
+++ b/browser/components/preferences/handlers.xml
@@ -57,33 +57,33 @@
</property>
</implementation>
</binding>
<binding id="handler" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
<content>
<xul:hbox flex="1" equalsize="always">
<xul:hbox flex="1" align="center">
- <xul:image src="moz-icon://goat?size=16"
+ <xul:image src="moz-icon://goat?size=16" class="typeIcon"
xbl:inherits="src=typeIcon" height="16" width="16"/>
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
</xul:hbox>
<xul:hbox flex="1" align="center">
- <xul:image xbl:inherits="src=actionIcon" height="16" width="16"/>
+ <xul:image xbl:inherits="src=actionIcon" height="16" width="16" class="actionIcon"/>
<xul:label flex="1" crop="end" xbl:inherits="value=actionDescription"/>
</xul:hbox>
</xul:hbox>
</content>
</binding>
<binding id="handler-selected" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
<content>
<xul:hbox flex="1" equalsize="always">
<xul:hbox flex="1" align="center">
- <xul:image src="moz-icon://goat?size=16"
+ <xul:image src="moz-icon://goat?size=16" class="typeIcon"
xbl:inherits="src=typeIcon" height="16" width="16"/>
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
</xul:hbox>
<xul:hbox flex="1">
<xul:menulist class="actionsMenu" flex="1" crop="end" selectedIndex="1"
oncommand="gApplicationsPane.onSelectAction(event.originalTarget)">
<xul:menupopup/>
</xul:menulist>
--- a/browser/components/preferences/preferences.xul
+++ b/browser/components/preferences/preferences.xul
@@ -44,16 +44,17 @@
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<!-- XXX This should be in applications.xul, but bug 393953 means putting it
- there causes the Applications pane not to work the first time you open
- the Preferences dialog in a browsing session, so we work around the problem
- by putting it here instead.
-->
<?xml-stylesheet href="chrome://browser/content/preferences/handlers.css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?>
<!DOCTYPE prefwindow [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % preferencesDTD SYSTEM "chrome://browser/locale/preferences/preferences.dtd">
%brandDTD;
%preferencesDTD;
]>
--- a/browser/themes/gnomestripe/browser/jar.mn
+++ b/browser/themes/gnomestripe/browser/jar.mn
@@ -43,16 +43,17 @@ classic.jar:
skin/classic/browser/places/starPage.png (places/starPage.png)
skin/classic/browser/places/tag.png (places/tag.png)
skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png)
skin/classic/browser/places/wrench.png (places/wrench.png)
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/Options.png (preferences/Options.png)
skin/classic/browser/preferences/plugin.png (preferences/plugin.png)
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
+ skin/classic/browser/preferences/applications.css (preferences/applications.css)
#ifdef MOZ_SAFE_BROWSING
skin/classic/browser/safebrowsing/browser-protection.css (safebrowsing/browser-protection.css)
skin/classic/browser/safebrowsing/close16x16.png (safebrowsing/close16x16.png)
skin/classic/browser/safebrowsing/dim.png (safebrowsing/dim.png)
skin/classic/browser/safebrowsing/tail.png (safebrowsing/tail.png)
skin/classic/browser/safebrowsing/warning16x16.png (safebrowsing/warning16x16.png)
skin/classic/browser/safebrowsing/warning24x24.png (safebrowsing/warning24x24.png)
#endif
new file mode 100644
--- /dev/null
+++ b/browser/themes/gnomestripe/browser/preferences/applications.css
@@ -0,0 +1,76 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Firefox Preferences System.
+ *
+ * The Initial Developer of the Original Code is Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Florian Queze <florian@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * Line up the actions menu with action labels above and below it.
+ * Equalize the distance from the left side of the action box to the left side
+ * of the icon for both the menu and the non-menu versions of the action box.
+ * Also make sure the labels are the same distance away from the icons.
+ */
+.actionsMenu {
+ margin-top: -1px;
+ margin-bottom: -1px;
+ -moz-margin-start: -1px;
+ -moz-margin-end: 0;
+}
+
+.typeIcon,
+.actionIcon {
+ -moz-margin-start: 3px;
+ -moz-margin-end: 3px;
+}
+
+richlistitem label {
+ -moz-margin-start: 1px;
+ margin-top: 2px;
+}
+
+richlistitem {
+ min-height: 25px;
+}
+
+.actionsMenu .menulist-icon {
+ -moz-margin-end: 1px;
+}
+
+.actionsMenu > menupopup > menuitem > .menu-iconic-left {
+ -moz-padding-start: 0;
+ -moz-padding-end: 4px;
+}
+
+.actionsMenu > menupopup > menuitem {
+ -moz-padding-start: 3px;
+}
--- a/browser/themes/pinstripe/browser/jar.mn
+++ b/browser/themes/pinstripe/browser/jar.mn
@@ -68,16 +68,17 @@ classic.jar:
skin/classic/browser/safebrowsing/tail.png (safebrowsing/tail.png)
skin/classic/browser/safebrowsing/warning16x16.png (safebrowsing/warning16x16.png)
skin/classic/browser/safebrowsing/warning24x24.png (safebrowsing/warning24x24.png)
#endif
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/Options.png (preferences/Options.png)
skin/classic/browser/preferences/plugin.png (preferences/plugin.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
+ skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd.png (tabbrowser/alltabs-box-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-bkgnd.png (tabbrowser/alltabs-box-overflow-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tab-arrow-start.png (tabbrowser/tab-arrow-start.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd.png (tabbrowser/tab-arrow-start-bkgnd.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd-animate.png (tabbrowser/tab-arrow-start-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tab-arrow-end.png (tabbrowser/tab-arrow-end.png)
skin/classic/browser/tabbrowser/tab-arrow-end-bkgnd.png (tabbrowser/tab-arrow-end-bkgnd.png)
new file mode 100644
--- /dev/null
+++ b/browser/themes/pinstripe/browser/preferences/applications.css
@@ -0,0 +1,71 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Firefox Preferences System.
+ *
+ * The Initial Developer of the Original Code is Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Florian Queze <florian@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * Line up the actions menu with action labels above and below it.
+ * Equalize the distance from the left side of the action box to the left side
+ * of the icon for both the menu and the non-menu versions of the action box.
+ * Also make sure the labels are the same distance away from the icons.
+ */
+.actionsMenu {
+ -moz-margin-start: -2px;
+ margin-top: 0;
+ margin-bottom: -1px;
+}
+
+.typeIcon,
+.actionIcon {
+ -moz-margin-start: 3px;
+ -moz-margin-end: 3px;
+}
+
+richlistitem label {
+ -moz-margin-start: 1px;
+ margin-top: 2px;
+}
+
+richlistitem {
+ min-height: 22px;
+}
+
+.actionsMenu .menulist-icon {
+ -moz-margin-end: 1px;
+}
+
+.actionsMenu > menupopup > menuitem > .menu-iconic-left {
+ -moz-padding-start: 3px;
+ -moz-padding-end: 1px;
+}
--- a/browser/themes/winstripe/browser/jar.mn
+++ b/browser/themes/winstripe/browser/jar.mn
@@ -53,16 +53,17 @@ classic.jar:
skin/classic/browser/safebrowsing/tail.png (safebrowsing/tail.png)
skin/classic/browser/safebrowsing/warning16x16.png (safebrowsing/warning16x16.png)
skin/classic/browser/safebrowsing/warning24x24.png (safebrowsing/warning24x24.png)
#endif
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/Options.png (preferences/Options.png)
skin/classic/browser/preferences/plugin.png (preferences/plugin.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
+ skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/tabbrowser/alltabs-box-overflow-end-bkgnd.png (tabbrowser/alltabs-box-overflow-end-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-end-bkgnd-hover.png (tabbrowser/alltabs-box-overflow-end-bkgnd-hover.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-start-bkgnd.png (tabbrowser/alltabs-box-overflow-start-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-start-bkgnd-hover.png (tabbrowser/alltabs-box-overflow-start-bkgnd-hover.png)
skin/classic/browser/tabbrowser/tab-arrow-end.png (tabbrowser/tab-arrow-end.png)
skin/classic/browser/tabbrowser/tab-arrow-start.png (tabbrowser/tab-arrow-start.png)
new file mode 100644
--- /dev/null
+++ b/browser/themes/winstripe/browser/preferences/applications.css
@@ -0,0 +1,76 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Firefox Preferences System.
+ *
+ * The Initial Developer of the Original Code is Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Florian Queze <florian@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * Line up the actions menu with action labels above and below it.
+ * Equalize the distance from the left side of the action box to the left side
+ * of the icon for both the menu and the non-menu versions of the action box.
+ * Also make sure the labels are the same distance away from the icons.
+ */
+.actionsMenu {
+ margin-top: 0;
+ margin-bottom: 0;
+ -moz-margin-start: -2px;
+ -moz-margin-end: 0;
+}
+
+.typeIcon,
+.actionIcon {
+ -moz-margin-start: 3px;
+ -moz-margin-end: 3px;
+}
+
+richlistitem label {
+ -moz-margin-start: 1px;
+ margin-top: 2px;
+}
+
+richlistitem {
+ min-height: 22px;
+}
+
+.actionsMenu .menulist-icon {
+ -moz-margin-end: 3px;
+}
+
+.actionsMenu > menupopup > menuitem > .menu-iconic-left {
+ -moz-padding-start: 0px;
+ -moz-padding-end: 2px;
+}
+
+.actionsMenu > menupopup > menuitem {
+ -moz-padding-start: 4px;
+}