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

Unified Diff: chrome/browser/ui/libgtkui/gtk_ui.cc

Issue 2760713002: Update the scale factor for font param before querying the default font. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/gtk_ui.cc
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc
index c1c6be79d134a5f85c5727f2fa946541b4e43d9d..06e2f94bd4893bdff66a6bd539a0cf30b5c09a94 100644
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -46,6 +46,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/display/display.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/font_render_params.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
@@ -948,6 +949,8 @@ void GtkUi::UpdateCursorTheme() {
}
void GtkUi::UpdateDefaultFont() {
+ gfx::SetFontRenderParamsDeviceScaleFactor(device_scale_factor_);
+
GtkWidget* fake_label = gtk_label_new(nullptr);
g_object_ref_sink(fake_label); // Remove the floating reference.
PangoContext* pc = gtk_widget_get_pango_context(fake_label);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698