Chromium Code Reviews| Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc |
| diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc |
| index e22761f027484abee8545cb625104892288b1e41..d4d4d60fda1699a144b29864c1c78e97fe040753 100644 |
| --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc |
| +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc |
| @@ -473,6 +473,7 @@ views::LinuxUI::NonClientMiddleClickAction GetDefaultMiddleClickAction() { |
| Gtk2UI::Gtk2UI() |
| : default_font_size_pixels_(0), |
| default_font_style_(gfx::Font::NORMAL), |
| + default_font_weight_(gfx::Font::Weight::NORMAL), |
| middle_click_action_(GetDefaultMiddleClickAction()), |
| device_scale_factor_(1.0) { |
| GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess()); |
| @@ -820,11 +821,13 @@ gfx::FontRenderParams Gtk2UI::GetDefaultFontRenderParams() const { |
| void Gtk2UI::GetDefaultFontDescription( |
| std::string* family_out, |
| int* size_pixels_out, |
| - int* style_out, |
| + bool* italic_out, |
| + gfx::Font::Weight* weight_out, |
| gfx::FontRenderParams* params_out) const { |
| *family_out = default_font_family_; |
| *size_pixels_out = default_font_size_pixels_; |
| - *style_out = default_font_style_; |
| + *italic_out = default_font_style_ == gfx::Font::ITALIC; |
|
msw
2016/03/25 01:33:09
nit: check (default_font_style_ & gfx::Font::ITALI
Mikus
2016/03/25 11:49:00
Done.
|
| + *weight_out = default_font_weight_; |
| *params_out = default_font_render_params_; |
| } |
| @@ -1346,9 +1349,10 @@ void Gtk2UI::UpdateDefaultFont() { |
| } |
| query.style = gfx::Font::NORMAL; |
| + query.weight = gfx::Font::Weight::NORMAL; |
| // TODO(davemoore): Support weights other than bold? |
|
msw
2016/03/25 01:33:09
It'll be much easier to address this TODO now! (in
Mikus
2016/03/25 11:49:00
Acknowledged. Todo changed.
|
| if (pango_font_description_get_weight(desc) == PANGO_WEIGHT_BOLD) |
| - query.style |= gfx::Font::BOLD; |
| + query.weight = gfx::Font::Weight::BOLD; |
| // TODO(davemoore): What about PANGO_STYLE_OBLIQUE? |
| if (pango_font_description_get_style(desc) == PANGO_STYLE_ITALIC) |
| query.style |= gfx::Font::ITALIC; |