diff options
author | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-11 17:34:42 +0000 |
---|---|---|
committer | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-11 17:34:42 +0000 |
commit | 954e197dc36dbf70ea5793060f847b2660c17b00 (patch) | |
tree | b05c23ff439b876ea20d492009027cd833f20143 /chrome | |
parent | 4a086dfd21ce4d3aaae84c9710e4949fa14554f3 (diff) | |
download | chromium_src-954e197dc36dbf70ea5793060f847b2660c17b00.zip chromium_src-954e197dc36dbf70ea5793060f847b2660c17b00.tar.gz chromium_src-954e197dc36dbf70ea5793060f847b2660c17b00.tar.bz2 |
1. Increase the width for 'date-container' in download.html to 110px to make room for dates in some languages. Increase the margin-left (LTR) and margin-rigth(RTL) accordingly.
2. Decrease the web font size (dom UI font size) for Bengali on Vista or later to 84% (the same value as used for English) while using 110% for XP. This is done by introducing a new 'string' (IDS_WEB_FONT_SIZE_XP) on Windows (other platforms won't get this).
BUG=21699
TEST=Run Chrome with '--lang=ml' (--lang=kn, --lang=bn) on Windows and go to the download page. Make sure that dates are in a single line.
Review URL: http://codereview.chromium.org/381009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/resources/locale_settings.grd | 7 | ||||
-rw-r--r-- | chrome/app/resources/locale_settings_bn.xtb | 13 | ||||
-rw-r--r-- | chrome/browser/dom_ui/chrome_url_data_manager.cc | 13 | ||||
-rw-r--r-- | chrome/browser/resources/downloads.html | 10 |
4 files changed, 30 insertions, 13 deletions
diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd index 0bbc205..fc8e835 100644 --- a/chrome/app/resources/locale_settings.grd +++ b/chrome/app/resources/locale_settings.grd @@ -239,6 +239,13 @@ 84% </message> </if> + <if expr="os == 'win32'"> + <!-- The relative font size in % used in web-style native pages + on Windows earlier than Vista (e.g. History). --> + <message name="IDS_WEB_FONT_SIZE_XP" use_name_for_id="true"> + 84% + </message> + </if> <if expr="os == 'darwin'"> <message name="IDS_WEB_FONT_FAMILY" desc="The font used in web-style native pages (e.g. History) (Mac)"> diff --git a/chrome/app/resources/locale_settings_bn.xtb b/chrome/app/resources/locale_settings_bn.xtb index 9c11ed5..a2672c1 100644 --- a/chrome/app/resources/locale_settings_bn.xtb +++ b/chrome/app/resources/locale_settings_bn.xtb @@ -1,17 +1,15 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="bn"> -<if expr="os != 'darwin'"> - <translation id="IDS_WEB_FONT_FAMILY">Vrinda</translation> -</if> -<if expr="os == 'darwin'"> - <translation id="IDS_WEB_FONT_FAMILY">Helvetica</translation> -</if> -<translation id="IDS_WEB_FONT_SIZE">110%</translation> <translation id="IDS_ACCEPT_LANGUAGES">bn-IN,bn,en-US,en</translation> <translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation> <translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation> +<translation id="IDS_WEB_FONT_SIZE">84%</translation> +<if expr="os == 'win32'"> + <translation id="IDS_WEB_FONT_SIZE_XP">110%</translation> +</if> <if expr="os != 'darwin'"> + <translation id="IDS_WEB_FONT_FAMILY">Vrinda</translation> <translation id="IDS_FIXED_FONT_FAMILY">Courier New</translation> <translation id="IDS_SERIF_FONT_FAMILY">Times New Roman</translation> <translation id="IDS_SANS_SERIF_FONT_FAMILY">Vrinda</translation> @@ -19,6 +17,7 @@ <translation id="IDS_FANTASY_FONT_FAMILY">Impact</translation> </if> <if expr="os == 'darwin'"> + <translation id="IDS_WEB_FONT_FAMILY">Helvetica</translation> <translation id="IDS_FIXED_FONT_FAMILY">Courier</translation> <translation id="IDS_SERIF_FONT_FAMILY">Times</translation> <translation id="IDS_SANS_SERIF_FONT_FAMILY">Helvetica</translation> diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc index f4cb9a0..3b0b494 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.cc +++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc @@ -12,6 +12,9 @@ #include "base/string_util.h" #include "base/thread.h" #include "base/values.h" +#if defined(OS_WIN) +#include "base/win_util.h" +#endif #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/net/chrome_url_request_context.h" @@ -296,8 +299,16 @@ void ChromeURLDataManager::DataSource::SetFontAndTextDirection( DictionaryValue* localized_strings) { localized_strings->SetString(L"fontfamily", l10n_util::GetString(IDS_WEB_FONT_FAMILY)); + + int web_font_size_id = IDS_WEB_FONT_SIZE; +#if defined(OS_WIN) + // Some fonts used for some languages changed a lot in terms of the font + // metric in Vista. So, we need to use different size before Vista. + if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) + web_font_size_id = IDS_WEB_FONT_SIZE_XP; +#endif localized_strings->SetString(L"fontsize", - l10n_util::GetString(IDS_WEB_FONT_SIZE)); + l10n_util::GetString(web_font_size_id)); localized_strings->SetString(L"textdirection", (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ? diff --git a/chrome/browser/resources/downloads.html b/chrome/browser/resources/downloads.html index 29f5020..de2922c 100644 --- a/chrome/browser/resources/downloads.html +++ b/chrome/browser/resources/downloads.html @@ -51,24 +51,24 @@ html[dir='rtl'] #downloads-summary > a { .download { position:relative; margin-top:6px; - margin-left:96px; + margin-left:114px; padding-left:56px; margin-bottom:15px; } html[dir='rtl'] .download { padding-left:0px; margin-left:0px; - margin-right:96px; + margin-right:114px; padding-right:56px; } .date-container { position:absolute; - left:-92px; - width:92px; + left:-110px; + width:110px; } html[dir='rtl'] .date-container { left:auto; - right:-92px; + right:-110px; } .date-container .since { color:black; |