summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 12:23:03 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 12:23:03 +0000
commitaf5ed956eb6372a4cc64d26dbbc934ebd784adeb (patch)
tree1a1786b2efdb69b9bd7c50c215113dd7963a65c9 /ui
parentb6fd2de0da9846e36c45d49237b81066decbaf43 (diff)
downloadchromium_src-af5ed956eb6372a4cc64d26dbbc934ebd784adeb.zip
chromium_src-af5ed956eb6372a4cc64d26dbbc934ebd784adeb.tar.gz
chromium_src-af5ed956eb6372a4cc64d26dbbc934ebd784adeb.tar.bz2
2nd try
Add shortcut keys to ui scaling - Round root window size because it can be fractional size when root_window_scale_ is specified. - Remove scaling option from about:flags. - Rotate display where the mouse is in. BUG=179997,119268 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188324 Review URL: https://codereview.chromium.org/12848004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/aura/root_window.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 729ceab..1aa78f9 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -36,8 +36,8 @@
#include "ui/gfx/display.h"
#include "ui/gfx/point3_f.h"
#include "ui/gfx/point_conversions.h"
-#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/screen.h"
+#include "ui/gfx/size_conversions.h"
using std::vector;
@@ -771,7 +771,6 @@ void RootWindow::UpdateWindowSize(const gfx::Size& host_size) {
bounds = ui::ConvertRectToDIP(layer(), bounds);
gfx::RectF new_bounds(bounds);
layer()->transform().TransformRect(&new_bounds);
-
// It makes little sense to scale beyond the original
// resolution.
DCHECK_LE(root_window_scale_, GetDeviceScaleFactor());
@@ -782,7 +781,10 @@ void RootWindow::UpdateWindowSize(const gfx::Size& host_size) {
new_bounds.Scale(root_window_scale_ * root_window_scale_);
// Ignore the origin because RootWindow's insets are handled by
// the transform.
- SetBounds(gfx::Rect(gfx::ToNearestRect(new_bounds).size()));
+ // Round the size because the bounds is no longer aligned to
+ // backing pixel when |root_window_scale_| is specified
+ // (850 height at 1.25 scale becomes 1062.5 for example.)
+ SetBounds(gfx::Rect(gfx::ToRoundedSize(new_bounds.size())));
}
void RootWindow::OnWindowAddedToRootWindow(Window* attached) {