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

Side by Side Diff: ui/chromeos/ime/infolist_window.cc

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: Rebase (conflict in layout_delegate.h due to r457774) Created 3 years, 9 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 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
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_ = new views::Label(entry.title, {title_font_list});
122 title_label_->SetPosition(gfx::Point(0, 0)); 122 title_label_->SetPosition(gfx::Point(0, 0));
123 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 123 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
124 title_label_->SetBorder(views::CreateEmptyBorder(4, 7, 2, 4)); 124 title_label_->SetBorder(views::CreateEmptyBorder(4, 7, 2, 4));
125 125
126 description_label_ = new views::Label(entry.body, description_font_list); 126 description_label_ = new views::Label(entry.body, {description_font_list});
127 description_label_->SetPosition(gfx::Point(0, 0)); 127 description_label_->SetPosition(gfx::Point(0, 0));
128 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 128 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
129 description_label_->SetMultiLine(true); 129 description_label_->SetMultiLine(true);
130 description_label_->SizeToFit(kInfolistEntryWidth); 130 description_label_->SizeToFit(kInfolistEntryWidth);
131 description_label_->SetBorder(views::CreateEmptyBorder(2, 17, 4, 4)); 131 description_label_->SetBorder(views::CreateEmptyBorder(2, 17, 4, 4));
132 AddChildView(title_label_); 132 AddChildView(title_label_);
133 AddChildView(description_label_); 133 AddChildView(description_label_);
134 UpdateBackground(); 134 UpdateBackground();
135 } 135 }
136 136
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 int InfolistWindow::GetDialogButtons() const { 281 int InfolistWindow::GetDialogButtons() const {
282 return ui::DIALOG_BUTTON_NONE; 282 return ui::DIALOG_BUTTON_NONE;
283 } 283 }
284 284
285 void InfolistWindow::WindowClosing() { 285 void InfolistWindow::WindowClosing() {
286 show_hide_timer_.Stop(); 286 show_hide_timer_.Stop();
287 } 287 }
288 288
289 } // namespace ime 289 } // namespace ime
290 } // namespace ui 290 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698