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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 2031223003: Support underline on Linux again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the gtk2_ui as well. Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | ui/gfx/font_list_unittest.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 "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <pango/pango.h> 8 #include <pango/pango.h>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 } 829 }
830 830
831 gfx::FontRenderParams Gtk2UI::GetDefaultFontRenderParams() const { 831 gfx::FontRenderParams Gtk2UI::GetDefaultFontRenderParams() const {
832 static gfx::FontRenderParams params = GetGtkFontRenderParams(); 832 static gfx::FontRenderParams params = GetGtkFontRenderParams();
833 return params; 833 return params;
834 } 834 }
835 835
836 void Gtk2UI::GetDefaultFontDescription( 836 void Gtk2UI::GetDefaultFontDescription(
837 std::string* family_out, 837 std::string* family_out,
838 int* size_pixels_out, 838 int* size_pixels_out,
839 bool* italic_out, 839 int* style_out,
840 gfx::Font::Weight* weight_out, 840 gfx::Font::Weight* weight_out,
841 gfx::FontRenderParams* params_out) const { 841 gfx::FontRenderParams* params_out) const {
842 *family_out = default_font_family_; 842 *family_out = default_font_family_;
843 *size_pixels_out = default_font_size_pixels_; 843 *size_pixels_out = default_font_size_pixels_;
844 *italic_out = (default_font_style_ & gfx::Font::ITALIC) != 0; 844 *style_out = default_font_style_;
845 *weight_out = default_font_weight_; 845 *weight_out = default_font_weight_;
846 *params_out = default_font_render_params_; 846 *params_out = default_font_render_params_;
847 } 847 }
848 848
849 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog( 849 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog(
850 ui::SelectFileDialog::Listener* listener, 850 ui::SelectFileDialog::Listener* listener,
851 ui::SelectFilePolicy* policy) const { 851 ui::SelectFilePolicy* policy) const {
852 return SelectFileDialogImpl::Create(listener, policy); 852 return SelectFileDialogImpl::Create(listener, policy);
853 } 853 }
854 854
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 // Blacklist scaling factors <130% (crbug.com/484400) and round 1403 // Blacklist scaling factors <130% (crbug.com/484400) and round
1404 // to 1 decimal to prevent rendering problems (crbug.com/485183). 1404 // to 1 decimal to prevent rendering problems (crbug.com/485183).
1405 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; 1405 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10;
1406 } 1406 }
1407 1407
1408 } // namespace libgtk2ui 1408 } // namespace libgtk2ui
1409 1409
1410 views::LinuxUI* BuildGtk2UI() { 1410 views::LinuxUI* BuildGtk2UI() {
1411 return new libgtk2ui::Gtk2UI; 1411 return new libgtk2ui::Gtk2UI;
1412 } 1412 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | ui/gfx/font_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698