| OLD | NEW |
| 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/canvas.h" |
| 11 #include "app/gfx/chrome_font.h" | 11 #include "app/gfx/font.h" |
| 12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 13 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
| 14 #include "base/gfx/native_theme.h" | 14 #include "base/gfx/native_theme.h" |
| 15 #include "grit/locale_settings.h" | 15 #include "grit/locale_settings.h" |
| 16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
| 17 #include "views/grid_layout.h" | 17 #include "views/grid_layout.h" |
| 18 #include "views/controls/label.h" | 18 #include "views/controls/label.h" |
| 19 #include "views/controls/separator.h" | 19 #include "views/controls/separator.h" |
| 20 #include "views/standard_layout.h" | 20 #include "views/standard_layout.h" |
| 21 | 21 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 SchedulePaint(); | 55 SchedulePaint(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 int OptionsGroupView::GetContentsWidth() const { | 58 int OptionsGroupView::GetContentsWidth() const { |
| 59 return contents_->width(); | 59 return contents_->width(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 /////////////////////////////////////////////////////////////////////////////// | 62 /////////////////////////////////////////////////////////////////////////////// |
| 63 // OptionsGroupView, views::View overrides: | 63 // OptionsGroupView, views::View overrides: |
| 64 | 64 |
| 65 void OptionsGroupView::Paint(ChromeCanvas* canvas) { | 65 void OptionsGroupView::Paint(gfx::Canvas* canvas) { |
| 66 if (highlighted_) { | 66 if (highlighted_) { |
| 67 COLORREF infocolor = GetSysColor(COLOR_INFOBK); | 67 COLORREF infocolor = GetSysColor(COLOR_INFOBK); |
| 68 SkColor background_color = SkColorSetRGB(GetRValue(infocolor), | 68 SkColor background_color = SkColorSetRGB(GetRValue(infocolor), |
| 69 GetGValue(infocolor), | 69 GetGValue(infocolor), |
| 70 GetBValue(infocolor)); | 70 GetBValue(infocolor)); |
| 71 int y_offset = kUnrelatedControlVerticalSpacing / 2; | 71 int y_offset = kUnrelatedControlVerticalSpacing / 2; |
| 72 canvas->FillRectInt(background_color, 0, 0, width(), | 72 canvas->FillRectInt(background_color, 0, 0, width(), |
| 73 height() - y_offset); | 73 height() - y_offset); |
| 74 } | 74 } |
| 75 } | 75 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |