L10n:Dialog sizes: Difference between revisions
Jump to navigation
Jump to search
(List of Firefox Chrome URL) |
(howto use the bookmarklet) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 9: | Line 9: | ||
javascript:(function(){var p=2;var cs=window.getComputedStyle(document.documentElement,null);var fs=cs.getPropertyCSSValue('font-size').getFloatValue(5);var w=cs.getPropertyCSSValue('width').getFloatValue(5);var h=cs.getPropertyCSSValue('height').getFloatValue(5);prompt('Dialog size:', 'width: '+Math.ceil(w/fs*p)/p+'em; height: '+Math.ceil(h/fs*p)/p+'em;');})(); | javascript:(function(){var p=2;var cs=window.getComputedStyle(document.documentElement,null);var fs=cs.getPropertyCSSValue('font-size').getFloatValue(5);var w=cs.getPropertyCSSValue('width').getFloatValue(5);var h=cs.getPropertyCSSValue('height').getFloatValue(5);prompt('Dialog size:', 'width: '+Math.ceil(w/fs*p)/p+'em; height: '+Math.ceil(h/fs*p)/p+'em;');})(); | ||
showsize bookmarklet to figure out a good size and create a patch. | showsize bookmarklet to figure out a good size and create a patch. | ||
; How to use the bookmarklet?: Create a bookmark using the above javascript code as the URL. Then, go to one of the chrome: URLs listed below (chrome://browser/content/preferences/preferences.xul for instance), and resize the browser's window to make sure all elements are displayed correctly. When you're happy with the result, just click the bookmarklet that you created, and you'll see what the new width and height are. | |||
== Prefwindow: == | == Prefwindow: == | ||
| Line 19: | Line 21: | ||
== References == | == References == | ||
* [http://kb.mozillazine.org/Dev_:_Firefox_Chrome_URLs Firefox Chrome URLs] | * [http://kb.mozillazine.org/Dev_:_Firefox_Chrome_URLs Firefox Chrome URLs] (many changed in FF3) | ||
Latest revision as of 15:57, 20 October 2009
In order to get dialog sizes right in Firefox 2, this page collects information about those dialogs that have specific sizing information in l10n.
Please fill in details about each dialog,
- how to get there (menu names, and positions, assume the tester can't read the script)
chrome://URL for the dialog, what you'd enter in the url bar to show the dialog- source location for the l10n size information
This way, testers can independently of language skills help in finding out if the dialog is properly sized, and if not, use the
javascript:(function(){var p=2;var cs=window.getComputedStyle(document.documentElement,null);var fs=cs.getPropertyCSSValue('font-size').getFloatValue(5);var w=cs.getPropertyCSSValue('width').getFloatValue(5);var h=cs.getPropertyCSSValue('height').getFloatValue(5);prompt('Dialog size:', 'width: '+Math.ceil(w/fs*p)/p+'em; height: '+Math.ceil(h/fs*p)/p+'em;');})();
showsize bookmarklet to figure out a good size and create a patch.
- How to use the bookmarklet?
- Create a bookmark using the above javascript code as the URL. Then, go to one of the chrome: URLs listed below (chrome://browser/content/preferences/preferences.xul for instance), and resize the browser's window to make sure all elements are displayed correctly. When you're happy with the result, just click the bookmarklet that you created, and you'll see what the new width and height are.
Prefwindow:
- Tools (second to last)
- Options (last)
- chrome url
- chrome://browser/content/preferences/preferences.xul
- l10n source
- browser/chrome/browser/preferences/preferences.dtd
References
- Firefox Chrome URLs (many changed in FF3)