diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 09:03:05 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 09:03:05 +0000 |
commit | 0603ca9446a35ccfd1ee56c2636c225e1c18fddb (patch) | |
tree | 6a67446bc06132dfce366d179cb54dc09016d0a1 /ash | |
parent | e93d2f8b00c19b3edc0345e31ea592e8d4d432da (diff) | |
download | chromium_src-0603ca9446a35ccfd1ee56c2636c225e1c18fddb.zip chromium_src-0603ca9446a35ccfd1ee56c2636c225e1c18fddb.tar.gz chromium_src-0603ca9446a35ccfd1ee56c2636c225e1c18fddb.tar.bz2 |
Aura: Fix tab strip showing under status area in compact mode
Also fixes status area position in RTL languages
BUG=111537
TEST=Run Chrome OS in English with lots of tabs then lock and unlock screen, also try RTL language like Hebrew
Review URL: http://codereview.chromium.org/9271088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/compact_status_area_layout_manager.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ash/wm/compact_status_area_layout_manager.cc b/ash/wm/compact_status_area_layout_manager.cc index c60d08d..7be8f14 100644 --- a/ash/wm/compact_status_area_layout_manager.cc +++ b/ash/wm/compact_status_area_layout_manager.cc @@ -5,14 +5,15 @@ #include "ash/wm/compact_status_area_layout_manager.h" #include "base/auto_reset.h" +#include "base/i18n/rtl.h" #include "ui/gfx/rect.h" #include "ui/gfx/screen.h" #include "ui/views/widget/widget.h" namespace { -// Padding between the right edge of status area and right edge of screen. -const int kRightEdgePad = 3; +// Padding between the side of status area and the side of screen. +const int kSideEdgePad = 3; // Padding between the top of the status area and the top of the screen. const int kTopEdgePad = 2; @@ -66,11 +67,16 @@ void CompactStatusAreaLayoutManager::SetChildBounds( void CompactStatusAreaLayoutManager::LayoutStatusArea() { AutoReset<bool> auto_reset_in_layout(&in_layout_, true); - // Place the widget in the top-right corner of the screen. gfx::Rect monitor_bounds = gfx::Screen::GetPrimaryMonitorBounds(); gfx::Rect widget_bounds = status_widget_->GetRestoredBounds(); - widget_bounds.set_x( - monitor_bounds.width() - widget_bounds.width() - kRightEdgePad); + if (base::i18n::IsRTL()) { + // Place the widget in the top-left corner of the screen. + widget_bounds.set_x(monitor_bounds.x() + kSideEdgePad); + } else { + // Place the widget in the top-right corner of the screen. + widget_bounds.set_x( + monitor_bounds.right() - widget_bounds.width() - kSideEdgePad); + } widget_bounds.set_y(kTopEdgePad); status_widget_->SetBounds(widget_bounds); } |