diff options
author | mmaliszkiewicz@opera.com <mmaliszkiewicz@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-24 22:29:33 +0000 |
---|---|---|
committer | mmaliszkiewicz@opera.com <mmaliszkiewicz@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-24 22:29:33 +0000 |
commit | 78dbec74ed053e3df304bea97b1f3c5f7662c0a6 (patch) | |
tree | 2d48815f900ff070d5257f0cefa216e66bc2e912 /ui/gfx/win | |
parent | 2f81b04fe39c9f946062957946c40001fce62337 (diff) | |
download | chromium_src-78dbec74ed053e3df304bea97b1f3c5f7662c0a6.zip chromium_src-78dbec74ed053e3df304bea97b1f3c5f7662c0a6.tar.gz chromium_src-78dbec74ed053e3df304bea97b1f3c5f7662c0a6.tar.bz2 |
[Win] alt + space opens system menu at wrong position in RTL ui.
When window is not maximized system menu opens on the left hand side and its
contents is partialy outside window bounds. After this fix when system menu
is opened using alt + space with RTL locale we draw it on the right hand side
and whole menu is inside browser window.
Review URL: https://codereview.chromium.org/134553002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/win')
-rw-r--r-- | ui/gfx/win/hwnd_util.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/gfx/win/hwnd_util.cc b/ui/gfx/win/hwnd_util.cc index a986e66..e28398a 100644 --- a/ui/gfx/win/hwnd_util.cc +++ b/ui/gfx/win/hwnd_util.cc @@ -207,9 +207,10 @@ void CheckWindowCreated(HWND hwnd) { void ShowSystemMenu(HWND window) { RECT rect; GetWindowRect(window, &rect); - Point point = Point(rect.left, rect.top); + Point point = Point(base::i18n::IsRTL() ? rect.right : rect.left, rect.top); static const int kSystemMenuOffset = 10; - point.Offset(kSystemMenuOffset, kSystemMenuOffset); + point.Offset(base::i18n::IsRTL() ? -kSystemMenuOffset : kSystemMenuOffset, + kSystemMenuOffset); ShowSystemMenuAtPoint(window, point); } |