Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: chrome/browser/views/options/options_group_view.cc

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <vsstyle.h> 5 #include <vsstyle.h>
6 #include <vssym32.h> 6 #include <vssym32.h>
7 7
8 #include "chrome/browser/views/options/options_group_view.h" 8 #include "chrome/browser/views/options/options_group_view.h"
9 9
10 #include "app/gfx/chrome_canvas.h" 10 #include "app/gfx/chrome_canvas.h"
(...skipping 18 matching lines...) Expand all
29 const std::wstring& title, 29 const std::wstring& title,
30 const std::wstring& description, 30 const std::wstring& description,
31 bool show_separator) 31 bool show_separator)
32 : contents_(contents), 32 : contents_(contents),
33 title_label_(new views::Label(title)), 33 title_label_(new views::Label(title)),
34 description_label_(new views::Label(description)), 34 description_label_(new views::Label(description)),
35 separator_(NULL), 35 separator_(NULL),
36 show_separator_(show_separator), 36 show_separator_(show_separator),
37 highlighted_(false) { 37 highlighted_(false) {
38 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 38 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
39 ChromeFont title_font = 39 gfx::Font title_font =
40 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, ChromeFont::BOLD); 40 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
41 title_label_->SetFont(title_font); 41 title_label_->SetFont(title_font);
42 SkColor title_color = gfx::NativeTheme::instance()->GetThemeColorWithDefault( 42 SkColor title_color = gfx::NativeTheme::instance()->GetThemeColorWithDefault(
43 gfx::NativeTheme::BUTTON, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR, 43 gfx::NativeTheme::BUTTON, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR,
44 COLOR_WINDOWTEXT); 44 COLOR_WINDOWTEXT);
45 title_label_->SetColor(title_color); 45 title_label_->SetColor(title_color);
46 title_label_->SetMultiLine(true); 46 title_label_->SetMultiLine(true);
47 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 47 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
48 48
49 description_label_->SetMultiLine(true); 49 description_label_->SetMultiLine(true);
50 description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 50 description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // OptionsGroupView, private: 85 // OptionsGroupView, private:
86 86
87 void OptionsGroupView::Init() { 87 void OptionsGroupView::Init() {
88 using views::GridLayout; 88 using views::GridLayout;
89 using views::ColumnSet; 89 using views::ColumnSet;
90 90
91 GridLayout* layout = new GridLayout(this); 91 GridLayout* layout = new GridLayout(this);
92 SetLayoutManager(layout); 92 SetLayoutManager(layout);
93 93
94 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 94 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
95 ChromeFont font = rb.GetFont(ResourceBundle::BaseFont); 95 gfx::Font font = rb.GetFont(ResourceBundle::BaseFont);
96 std::wstring left_column_chars = 96 std::wstring left_column_chars =
97 l10n_util::GetString(IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS); 97 l10n_util::GetString(IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS);
98 int left_column_width = 98 int left_column_width =
99 font.GetExpectedTextWidth(_wtoi(left_column_chars.c_str())); 99 font.GetExpectedTextWidth(_wtoi(left_column_chars.c_str()));
100 100
101 const int two_column_layout_id = 0; 101 const int two_column_layout_id = 0;
102 ColumnSet* column_set = layout->AddColumnSet(two_column_layout_id); 102 ColumnSet* column_set = layout->AddColumnSet(two_column_layout_id);
103 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); 103 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
104 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0, 104 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0,
105 GridLayout::FIXED, left_column_width, 0); 105 GridLayout::FIXED, left_column_width, 0);
(...skipping 21 matching lines...) Expand all
127 const int single_column_layout_id = 1; 127 const int single_column_layout_id = 1;
128 column_set = layout->AddColumnSet(single_column_layout_id); 128 column_set = layout->AddColumnSet(single_column_layout_id);
129 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, 129 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
130 GridLayout::USE_PREF, 0, 0); 130 GridLayout::USE_PREF, 0, 0);
131 131
132 separator_ = new views::Separator; 132 separator_ = new views::Separator;
133 layout->StartRow(0, single_column_layout_id); 133 layout->StartRow(0, single_column_layout_id);
134 layout->AddView(separator_); 134 layout->AddView(separator_);
135 } 135 }
136 } 136 }
OLDNEW
« no previous file with comments | « chrome/browser/views/options/languages_page_view.cc ('k') | chrome/browser/views/page_info_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698