| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/chromeos/ime/infolist_window.h" | 5 #include "ui/chromeos/ime/infolist_window.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(InfolistEntryView); | 112 DISALLOW_COPY_AND_ASSIGN(InfolistEntryView); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 InfolistEntryView::InfolistEntryView(const ui::InfolistEntry& entry, | 115 InfolistEntryView::InfolistEntryView(const ui::InfolistEntry& entry, |
| 116 const gfx::FontList& title_font_list, | 116 const gfx::FontList& title_font_list, |
| 117 const gfx::FontList& description_font_list) | 117 const gfx::FontList& description_font_list) |
| 118 : entry_(entry) { | 118 : entry_(entry) { |
| 119 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); | 119 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); |
| 120 | 120 |
| 121 title_label_ = new views::Label(entry.title, title_font_list); | 121 title_label_ = |
| 122 new views::Label(entry.title, views::Label::CustomFont{title_font_list}); |
| 122 title_label_->SetPosition(gfx::Point(0, 0)); | 123 title_label_->SetPosition(gfx::Point(0, 0)); |
| 123 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 124 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 124 title_label_->SetBorder(views::CreateEmptyBorder(4, 7, 2, 4)); | 125 title_label_->SetBorder(views::CreateEmptyBorder(4, 7, 2, 4)); |
| 125 | 126 |
| 126 description_label_ = new views::Label(entry.body, description_font_list); | 127 description_label_ = new views::Label( |
| 128 entry.body, views::Label::CustomFont{description_font_list}); |
| 127 description_label_->SetPosition(gfx::Point(0, 0)); | 129 description_label_->SetPosition(gfx::Point(0, 0)); |
| 128 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 130 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 129 description_label_->SetMultiLine(true); | 131 description_label_->SetMultiLine(true); |
| 130 description_label_->SizeToFit(kInfolistEntryWidth); | 132 description_label_->SizeToFit(kInfolistEntryWidth); |
| 131 description_label_->SetBorder(views::CreateEmptyBorder(2, 17, 4, 4)); | 133 description_label_->SetBorder(views::CreateEmptyBorder(2, 17, 4, 4)); |
| 132 AddChildView(title_label_); | 134 AddChildView(title_label_); |
| 133 AddChildView(description_label_); | 135 AddChildView(description_label_); |
| 134 UpdateBackground(); | 136 UpdateBackground(); |
| 135 } | 137 } |
| 136 | 138 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 int InfolistWindow::GetDialogButtons() const { | 283 int InfolistWindow::GetDialogButtons() const { |
| 282 return ui::DIALOG_BUTTON_NONE; | 284 return ui::DIALOG_BUTTON_NONE; |
| 283 } | 285 } |
| 284 | 286 |
| 285 void InfolistWindow::WindowClosing() { | 287 void InfolistWindow::WindowClosing() { |
| 286 show_hide_timer_.Stop(); | 288 show_hide_timer_.Stop(); |
| 287 } | 289 } |
| 288 | 290 |
| 289 } // namespace ime | 291 } // namespace ime |
| 290 } // namespace ui | 292 } // namespace ui |
| OLD | NEW |