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

Unified Diff: chrome/browser/ui/views/frame/minimize_button_metrics_win.cc

Issue 2881563004: Clear the cached avatar button offset when the DPI scaling changes (Closed)
Patch Set: Created 3 years, 7 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/ui/views/frame/minimize_button_metrics_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/minimize_button_metrics_win.cc
diff --git a/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc b/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc
index 93080cd5c189c62b00c9e8fe87185b438f2cf545..55e008697eb92c1801c8e7e87f708a819d0843bb 100644
--- a/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc
+++ b/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc
@@ -87,6 +87,12 @@ void MinimizeButtonMetrics::OnHWNDActivated() {
// correct.
}
+void MinimizeButtonMetrics::OnDpiChanged() {
+ // This ensures that the next time GetMinimizeButtonOffsetX() is called, it
+ // will be recalculated, given the new scale factor.
+ cached_minimize_button_x_delta_ = 0;
+}
+
// This function attempts to calculate the odd and varying difference
// between the results of DwmGetWindowAttribute with the
// DWMWA_CAPTION_BUTTON_BOUNDS flag and the information from the
« no previous file with comments | « chrome/browser/ui/views/frame/minimize_button_metrics_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698