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

Unified Diff: chrome/browser/ui/views/tabs/dragged_tab_view.cc

Issue 16336027: Enable high dpi in win/views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | ui/base/win/dpi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/dragged_tab_view.cc
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.cc b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
index 6854bd8e4a495a847dc56c481475101e95cea5c4..d95d9dac1999d7bd8563a3b9262a1099be566263 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
@@ -13,6 +13,7 @@
#if defined(USE_AURA)
#include "ui/views/widget/native_widget_aura.h"
#elif defined(OS_WIN)
+#include "ui/base/win/dpi.h"
#include "ui/views/widget/native_widget_win.h"
#endif
@@ -81,6 +82,9 @@ void DraggedTabView::MoveTo(const gfx::Point& screen_point) {
int y = screen_point.y() - ScaleValue(mouse_tab_offset_.y());
#if defined(OS_WIN) && !defined(USE_AURA)
+ double scale = ui::win::GetDeviceScaleFactor();
+ x = static_cast<int>(scale * screen_point.x());
+ y = static_cast<int>(scale * screen_point.y());
// TODO(beng): make this cross-platform
int show_flags = container_->IsVisible() ? SWP_NOZORDER : SWP_SHOWWINDOW;
SetWindowPos(container_->GetNativeView(), HWND_TOP, x, y, 0, 0,
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | ui/base/win/dpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698