diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 16:49:26 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 16:49:26 +0000 |
commit | 28065f66296d0d012aa5b02c147f4f77ef8a771e (patch) | |
tree | 9fc2567cd9a4edaf09a322e2465b8540787c118c /chrome/browser/views/about_chrome_view.cc | |
parent | 120e1f1b2728ae5d1d4fed21bddb3533b921fdba (diff) | |
download | chromium_src-28065f66296d0d012aa5b02c147f4f77ef8a771e.zip chromium_src-28065f66296d0d012aa5b02c147f4f77ef8a771e.tar.gz chromium_src-28065f66296d0d012aa5b02c147f4f77ef8a771e.tar.bz2 |
Use the system WINDOWTEXT color for labels, instead of black. Also use the system WINDOW color for InfoBubbles, not white. Several places are made to explicitly use black labels where that's correct or respecting system colors is a non-trivial fix (bugs filed for most).
Also, apparently I didn't get all my cleanup changes in the last patch, oops.
BUG=92,21027
TEST=Set theme to high-contrast black on white, check that most pieces of chrome UI have readable text
Review URL: http://codereview.chromium.org/237005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/about_chrome_view.cc')
-rw-r--r-- | chrome/browser/views/about_chrome_view.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index 6b2ba40..fc18064 100644 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -166,6 +166,7 @@ void AboutChromeView::Init() { l10n_util::GetString(IDS_PRODUCT_NAME)); about_title_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( ResourceBundle::BaseFont).DeriveFont(18, BOLD_FONTTYPE)); + about_title_label_->SetColor(SK_ColorBLACK); AddChildView(about_title_label_); // This is a text field so people can copy the version number from the dialog. @@ -173,6 +174,7 @@ void AboutChromeView::Init() { version_label_->SetText(current_version_); version_label_->SetReadOnly(true); version_label_->RemoveBorder(); + version_label_->SetTextColor(SK_ColorBLACK); version_label_->SetBackgroundColor(SK_ColorWHITE); version_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( ResourceBundle::BaseFont).DeriveFont(0, BOLD_FONTTYPE)); @@ -493,6 +495,13 @@ void AboutChromeView::DrawTextStartingFrom(gfx::Canvas* canvas, const gfx::Rect& bounds, const gfx::Font& font, bool ltr_within_rtl) { +#if defined(OS_WIN) + const SkColor text_color = color_utils::GetSysSkColor(COLOR_WINDOWTEXT); +#else + // TODO(beng): source from theme provider. + const SkColor text_color = SkColor_BLACK; +#endif + // Iterate through line breaking opportunities (which in English would be // spaces and such. This tells us where to wrap. WordIterator iter(text, WordIterator::BREAK_LINE); @@ -537,7 +546,7 @@ void AboutChromeView::DrawTextStartingFrom(gfx::Canvas* canvas, int y = position->height() + bounds.y(); // Draw the text on the screen (mirrored, if RTL run). - canvas->DrawStringInt(word, font, SK_ColorBLACK, x, y, w, h, flags); + canvas->DrawStringInt(word, font, text_color, x, y, w, h, flags); if (word.size() > 0 && word[word.size() - 1] == L'\x0a') { // When we come across '\n', we move to the beginning of the next line. |