From e842b085b4cf1b859ca189703203fb65cb4c4373 Mon Sep 17 00:00:00 2001 From: "mozilla.mano@sent.com" Date: Mon, 3 Dec 2007 17:45:52 -0800 Subject: [PATCH] Bug 398445 - eliminate jitter when selecting new item in Applications prefpane. patch from Florian Queze , r=me. --- browser/components/preferences/handlers.css | 15 +--- browser/components/preferences/handlers.xml | 6 +- .../components/preferences/preferences.xul | 1 + browser/themes/gnomestripe/browser/jar.mn | 1 + .../browser/preferences/applications.css | 76 +++++++++++++++++++ browser/themes/pinstripe/browser/jar.mn | 1 + .../browser/preferences/applications.css | 71 +++++++++++++++++ browser/themes/winstripe/browser/jar.mn | 1 + .../browser/preferences/applications.css | 76 +++++++++++++++++++ 9 files changed, 231 insertions(+), 17 deletions(-) create mode 100644 browser/themes/gnomestripe/browser/preferences/applications.css create mode 100644 browser/themes/pinstripe/browser/preferences/applications.css create mode 100644 browser/themes/winstripe/browser/preferences/applications.css diff --git a/browser/components/preferences/handlers.css b/browser/components/preferences/handlers.css index 37a3f23a692..1b889f9ecd8 100755 --- a/browser/components/preferences/handlers.css +++ b/browser/components/preferences/handlers.css @@ -43,24 +43,11 @@ richlistitem[selected="true"] { } /** - * 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; } diff --git a/browser/components/preferences/handlers.xml b/browser/components/preferences/handlers.xml index 8991e6267c9..ba00515e5e5 100755 --- a/browser/components/preferences/handlers.xml +++ b/browser/components/preferences/handlers.xml @@ -62,12 +62,12 @@ - - + @@ -78,7 +78,7 @@ - diff --git a/browser/components/preferences/preferences.xul b/browser/components/preferences/preferences.xul index a2a672a3cfd..7529d99a62e 100644 --- a/browser/components/preferences/preferences.xul +++ b/browser/components/preferences/preferences.xul @@ -49,6 +49,7 @@ - by putting it here instead. --> + diff --git a/browser/themes/gnomestripe/browser/jar.mn b/browser/themes/gnomestripe/browser/jar.mn index 1b2f09ce4ed..102978a32bd 100644 --- a/browser/themes/gnomestripe/browser/jar.mn +++ b/browser/themes/gnomestripe/browser/jar.mn @@ -48,6 +48,7 @@ classic.jar: 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) diff --git a/browser/themes/gnomestripe/browser/preferences/applications.css b/browser/themes/gnomestripe/browser/preferences/applications.css new file mode 100644 index 00000000000..3060d8ecad5 --- /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 + * + * 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; +} diff --git a/browser/themes/pinstripe/browser/jar.mn b/browser/themes/pinstripe/browser/jar.mn index 4db9653c6b5..89bb91f2deb 100644 --- a/browser/themes/pinstripe/browser/jar.mn +++ b/browser/themes/pinstripe/browser/jar.mn @@ -73,6 +73,7 @@ classic.jar: 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) diff --git a/browser/themes/pinstripe/browser/preferences/applications.css b/browser/themes/pinstripe/browser/preferences/applications.css new file mode 100644 index 00000000000..7479d46d26a --- /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 + * + * 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; +} diff --git a/browser/themes/winstripe/browser/jar.mn b/browser/themes/winstripe/browser/jar.mn index 352cacf17ff..c11bae6ab87 100644 --- a/browser/themes/winstripe/browser/jar.mn +++ b/browser/themes/winstripe/browser/jar.mn @@ -58,6 +58,7 @@ classic.jar: 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) diff --git a/browser/themes/winstripe/browser/preferences/applications.css b/browser/themes/winstripe/browser/preferences/applications.css new file mode 100644 index 00000000000..f4230c01eff --- /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 + * + * 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; +}