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

Unified Diff: ui/views/controls/menu/menu_separator_win.cc

Issue 1889423002: Move Windows DPI Code from ui/gfx to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO Created 4 years, 8 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 | « ui/views/BUILD.gn ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_separator_win.cc
diff --git a/ui/views/controls/menu/menu_separator_win.cc b/ui/views/controls/menu/menu_separator_win.cc
index 182cc2b3294aa403bc06057e2673943270a433ad..2ecabdbeb1c30056d49da57d03ea94d0db9ff6e0 100644
--- a/ui/views/controls/menu/menu_separator_win.cc
+++ b/ui/views/controls/menu/menu_separator_win.cc
@@ -8,9 +8,9 @@
#include <uxtheme.h>
#include <Vssym32.h>
+#include "ui/display/win/dpi.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/win/dpi.h"
#include "ui/native_theme/native_theme.h"
#include "ui/native_theme/native_theme_aura.h"
#include "ui/views/controls/menu/menu_item_view.h"
@@ -29,7 +29,7 @@ void MenuSeparator::OnPaint(gfx::Canvas* canvas) {
// Hack to get the separator to display correctly on Windows where we may
// have fractional scales. We move the separator 1 pixel down to ensure that
// it falls within the clipping rect which is scaled up.
- float device_scale = gfx::GetDPIScale();
+ float device_scale = display::win::GetDPIScale();
bool is_fractional_scale =
(device_scale - static_cast<int>(device_scale) != 0);
if (is_fractional_scale && separator_bounds.y() == 0)
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698