Fix encoding of linux_build.patch
This commit is contained in:
parent
9809504014
commit
8c8deea63a
|
@ -1,17 +1,17 @@
|
|||
diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
index 7df1d0c..3dd3209 100644
|
||||
--- chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
+++ chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
@@ -320,8 +320,12 @@ float GetRawDeviceScaleFactor() {
|
||||
return display::Display::GetForcedDeviceScaleFactor();
|
||||
|
||||
GdkScreen* screen = gdk_screen_get_default();
|
||||
+#if GTK_MAJOR_VERSION == 3
|
||||
gint scale = gdk_screen_get_monitor_scale_factor(
|
||||
screen, gdk_screen_get_primary_monitor(screen));
|
||||
+#else
|
||||
+ gint scale = 1;
|
||||
+#endif
|
||||
gdouble resolution = gdk_screen_get_resolution(screen);
|
||||
return resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
|
||||
}
|
||||
diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
index 7df1d0c..3dd3209 100644
|
||||
--- chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
+++ chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
@@ -320,8 +320,12 @@ float GetRawDeviceScaleFactor() {
|
||||
return display::Display::GetForcedDeviceScaleFactor();
|
||||
|
||||
GdkScreen* screen = gdk_screen_get_default();
|
||||
+#if GTK_MAJOR_VERSION == 3
|
||||
gint scale = gdk_screen_get_monitor_scale_factor(
|
||||
screen, gdk_screen_get_primary_monitor(screen));
|
||||
+#else
|
||||
+ gint scale = 1;
|
||||
+#endif
|
||||
gdouble resolution = gdk_screen_get_resolution(screen);
|
||||
return resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue