| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "chrome/browser/views/about_chrome_view.h" | 5 #include "chrome/browser/views/about_chrome_view.h" | 
| 6 | 6 | 
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" | 
| 8 #include "app/gfx/color_utils.h" | 8 #include "app/gfx/color_utils.h" | 
| 9 #include "base/i18n/word_iterator.h" | 9 #include "base/i18n/word_iterator.h" | 
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" | 
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 166   else | 166   else | 
| 167     about_background_logo = rb.GetBitmapNamed(IDR_ABOUT_BACKGROUND); | 167     about_background_logo = rb.GetBitmapNamed(IDR_ABOUT_BACKGROUND); | 
| 168 | 168 | 
| 169   about_dlg_background_logo_->SetImage(*about_background_logo); | 169   about_dlg_background_logo_->SetImage(*about_background_logo); | 
| 170   AddChildView(about_dlg_background_logo_); | 170   AddChildView(about_dlg_background_logo_); | 
| 171 | 171 | 
| 172   // Add the dialog labels. | 172   // Add the dialog labels. | 
| 173   about_title_label_ = new views::Label( | 173   about_title_label_ = new views::Label( | 
| 174       l10n_util::GetString(IDS_PRODUCT_NAME)); | 174       l10n_util::GetString(IDS_PRODUCT_NAME)); | 
| 175   about_title_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( | 175   about_title_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( | 
| 176       ResourceBundle::BaseFont).DeriveFont(18, gfx::Font::BOLD)); | 176       ResourceBundle::BaseFont).DeriveFont(18)); | 
| 177   about_title_label_->SetColor(SK_ColorBLACK); | 177   about_title_label_->SetColor(SK_ColorBLACK); | 
| 178   AddChildView(about_title_label_); | 178   AddChildView(about_title_label_); | 
| 179 | 179 | 
| 180   // This is a text field so people can copy the version number from the dialog. | 180   // This is a text field so people can copy the version number from the dialog. | 
| 181   version_label_ = new views::Textfield(); | 181   version_label_ = new views::Textfield(); | 
| 182   version_label_->SetText(WideToUTF16Hack(current_version_)); | 182   version_label_->SetText(WideToUTF16Hack(current_version_)); | 
| 183   version_label_->SetReadOnly(true); | 183   version_label_->SetReadOnly(true); | 
| 184   version_label_->RemoveBorder(); | 184   version_label_->RemoveBorder(); | 
| 185   version_label_->SetTextColor(SK_ColorBLACK); | 185   version_label_->SetTextColor(SK_ColorBLACK); | 
| 186   version_label_->SetBackgroundColor(SK_ColorWHITE); | 186   version_label_->SetBackgroundColor(SK_ColorWHITE); | 
| 187   version_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( | 187   version_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( | 
| 188       ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD)); | 188       ResourceBundle::BaseFont)); | 
| 189   AddChildView(version_label_); | 189   AddChildView(version_label_); | 
| 190 | 190 | 
| 191   // The copyright URL portion of the main label. | 191   // The copyright URL portion of the main label. | 
| 192   copyright_label_ = new views::Label( | 192   copyright_label_ = new views::Label( | 
| 193       l10n_util::GetString(IDS_ABOUT_VERSION_COPYRIGHT)); | 193       l10n_util::GetString(IDS_ABOUT_VERSION_COPYRIGHT)); | 
| 194   copyright_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 194   copyright_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 
| 195   AddChildView(copyright_label_); | 195   AddChildView(copyright_label_); | 
| 196 | 196 | 
| 197   main_text_label_ = new views::Label(L""); | 197   main_text_label_ = new views::Label(L""); | 
| 198 | 198 | 
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 858   View* parent = GetParent(); | 858   View* parent = GetParent(); | 
| 859   parent->Layout(); | 859   parent->Layout(); | 
| 860 | 860 | 
| 861   // Check button may have appeared/disappeared. We cannot call this during | 861   // Check button may have appeared/disappeared. We cannot call this during | 
| 862   // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 862   // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 
| 863   if (window()) | 863   if (window()) | 
| 864     GetDialogClientView()->UpdateDialogButtons(); | 864     GetDialogClientView()->UpdateDialogButtons(); | 
| 865 } | 865 } | 
| 866 | 866 | 
| 867 #endif | 867 #endif | 
| OLD | NEW | 
|---|