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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1306173002: Set font size to 14 in location bar for material design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « chrome/browser/themes/theme_properties.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 2d5fd1269c656e4c5bdc2f229d81f7408f2e86cf..826253fc6c2ed972af57fdf3d39332894de65e3d 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -201,14 +201,18 @@ void LocationBarView::Init() {
gfx::FontList font_list = ResourceBundle::GetSharedInstance().GetFontList(
ResourceBundle::BaseFont);
const int current_font_size = font_list.GetFontSize();
- const int desired_font_size = browser_defaults::kOmniboxFontPixelSize;
Peter Kasting 2015/08/21 17:14:35 Please remove the declaration and definition of th
tdanderson 2015/08/21 18:17:24 Done.
+ const int desired_font_size = GetThemeProvider()->GetDisplayProperty(
+ ThemeProperties::PROPERTY_OMNIBOX_FONT_PIXEL_SIZE);
if (current_font_size != desired_font_size) {
font_list =
font_list.DeriveWithSizeDelta(desired_font_size - current_font_size);
}
// Shrink large fonts to make them fit.
// TODO(pkasting): Stretch the location bar instead in this case.
- const int location_height = GetInternalHeight(true);
+ const int location_height = ui::MaterialDesignController::IsModeMaterial() ?
+ GetThemeProvider()->GetDisplayProperty(
+ ThemeProperties::PROPERTY_LOCATION_BAR_HEIGHT) :
+ GetInternalHeight(true);
font_list = font_list.DeriveWithHeightUpperBound(location_height);
// Determine the font for use inside the bubbles. The bubble background
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698