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

Unified Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 10537022: Temporary fix for Infolist font issue. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/candidate_window_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/candidate_window.cc
diff --git a/chrome/browser/chromeos/input_method/candidate_window.cc b/chrome/browser/chromeos/input_method/candidate_window.cc
index 030dc0c6b3b84017e383fce067fa65847159c8c7..22afa1216c64e9f9f21dd83afbb6d35a8da65883 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc
@@ -1290,16 +1290,14 @@ InfolistView::InfolistView(
void InfolistView::Init() {
title_label_ = new views::Label;
title_label_->SetPosition(gfx::Point(0, 0));
- title_label_->SetFont(
- title_label_->font().DeriveFont(kFontSizeDelta + 2));
+ title_label_->SetFont(parent_infolist_window_->GetTitleFont());
title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
title_label_->set_border(
views::Border::CreateEmptyBorder(4, 7, 2, 4));
description_label_ = new views::Label;
description_label_->SetPosition(gfx::Point(0, 0));
- description_label_->SetFont(
- description_label_->font().DeriveFont(kFontSizeDelta - 2));
+ description_label_->SetFont(parent_infolist_window_->GetDescriptionFont());
description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
description_label_->SetMultiLine(true);
description_label_->set_border(
@@ -1367,7 +1365,9 @@ InfolistWindowView::InfolistWindowView(views::Widget* parent_frame,
parent_frame_(parent_frame),
candidate_window_frame_(candidate_window_frame),
infolist_area_(NULL),
- visible_(false) {
+ visible_(false),
+ title_font_(new gfx::Font("MotoyaG04Gothic", kFontSizeDelta + 15)),
+ description_font_(new gfx::Font("MotoyaG04Gothic", kFontSizeDelta + 11)) {
Seigo Nonaka 2012/06/06 06:20:16 IIRC Motoya font is only available official Chrome
Yusuke Sato 2012/06/07 05:16:19 Or you can just do something like: namespace { #
horo 2012/06/08 02:09:56 Done. Thank you for the suggestion.
}
InfolistWindowView::~InfolistWindowView() {
@@ -1557,11 +1557,19 @@ void InfolistWindowView::VisibilityChanged(View* starting_from,
ResizeAndMoveParentFrame();
}
}
+
void InfolistWindowView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
View::OnBoundsChanged(previous_bounds);
ResizeAndMoveParentFrame();
}
+gfx::Font InfolistWindowView::GetTitleFont() {
+ return *title_font_.get();
+}
+
+gfx::Font InfolistWindowView::GetDescriptionFont() {
+ return *description_font_.get();
+}
bool CandidateWindowControllerImpl::Init() {
// Create the candidate window view.
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/candidate_window_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698