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

Side by Side Diff: ui/views/bubble/bubble_frame_view.cc

Issue 1689623004: Start removing enum ui::ResourceBundle::FontStyle, fix MacViews font sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix transcription error Created 4 years, 10 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
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/bubble/bubble_frame_view.h" 5 #include "ui/views/bubble/bubble_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "ui/base/default_style.h"
11 #include "ui/base/hit_test.h" 12 #include "ui/base/hit_test.h"
12 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/geometry/vector2d.h" 15 #include "ui/gfx/geometry/vector2d.h"
15 #include "ui/gfx/path.h" 16 #include "ui/gfx/path.h"
16 #include "ui/gfx/screen.h" 17 #include "ui/gfx/screen.h"
17 #include "ui/gfx/skia_util.h" 18 #include "ui/gfx/skia_util.h"
18 #include "ui/native_theme/native_theme.h" 19 #include "ui/native_theme/native_theme.h"
19 #include "ui/resources/grit/ui_resources.h" 20 #include "ui/resources/grit/ui_resources.h"
20 #include "ui/strings/grit/ui_strings.h" 21 #include "ui/strings/grit/ui_strings.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 title_icon_(new views::ImageView()), 78 title_icon_(new views::ImageView()),
78 title_(nullptr), 79 title_(nullptr),
79 close_(nullptr), 80 close_(nullptr),
80 titlebar_extra_view_(nullptr), 81 titlebar_extra_view_(nullptr),
81 footnote_container_(nullptr), 82 footnote_container_(nullptr),
82 close_button_clicked_(false) { 83 close_button_clicked_(false) {
83 AddChildView(title_icon_); 84 AddChildView(title_icon_);
84 85
85 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 86 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
86 title_ = new Label(base::string16(), 87 title_ = new Label(base::string16(),
87 rb.GetFontList(ui::ResourceBundle::MediumFont)); 88 rb.GetFontListWithDelta(ui::kTitleFontSizeDelta));
88 title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 89 title_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
89 title_->set_collapse_when_hidden(true); 90 title_->set_collapse_when_hidden(true);
90 title_->SetVisible(false); 91 title_->SetVisible(false);
91 title_->SetMultiLine(true); 92 title_->SetMultiLine(true);
92 AddChildView(title_); 93 AddChildView(title_);
93 94
94 close_ = CreateCloseButton(this); 95 close_ = CreateCloseButton(this);
95 close_->SetVisible(false); 96 close_->SetVisible(false);
96 AddChildView(close_); 97 AddChildView(close_);
97 } 98 }
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 size.Enlarge(client_insets.width(), client_insets.height()); 519 size.Enlarge(client_insets.width(), client_insets.height());
519 size.SetToMax(gfx::Size(title_bar_width, 0)); 520 size.SetToMax(gfx::Size(title_bar_width, 0));
520 521
521 if (footnote_container_) 522 if (footnote_container_)
522 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); 523 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width()));
523 524
524 return size; 525 return size;
525 } 526 }
526 527
527 } // namespace views 528 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698