Index: ash/shelf/shelf_layout_manager.cc |
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc |
index 0d94aa48c19d4c4b01aa87d1e49eb4e569163a55..ea88afed0e839bf8c159bcf036899549e89aece0 100644 |
--- a/ash/shelf/shelf_layout_manager.cc |
+++ b/ash/shelf/shelf_layout_manager.cc |
@@ -73,9 +73,6 @@ const int kNotificationBubbleGapHeight = 6; |
// the auto hidden shelf when the shelf is on the boundary between displays. |
const int kMaxAutoHideShowShelfRegionSize = 10; |
-// Const inset from the edget of the shelf to the edget of the status area. |
-const int kStatusAreaInset = 3; |
- |
ui::Layer* GetLayer(views::Widget* widget) { |
return widget->GetNativeView()->layer(); |
} |
@@ -100,6 +97,9 @@ const int ShelfLayoutManager::kAutoHideSize = 3; |
// static |
const int ShelfLayoutManager::kShelfSize = 47; |
+// static |
+const int ShelfLayoutManager::kShelfItemInset = 3; |
+ |
int ShelfLayoutManager::GetPreferredShelfSize() { |
return ash::switches::UseAlternateShelfLayout() ? |
ShelfLayoutManager::kShelfSize : kLauncherPreferredSize; |
@@ -769,8 +769,13 @@ void ShelfLayoutManager::CalculateTargetBounds( |
int status_inset = std::max(0, GetPreferredShelfSize() - |
PrimaryAxisValue(status_size.height(), status_size.width())); |
- if (ash::switches::UseAlternateShelfLayout()) |
- status_inset = kStatusAreaInset; |
+ if (ash::switches::UseAlternateShelfLayout()) { |
+ status_inset = 0; |
+ if (IsHorizontalAlignment()) |
+ status_size.set_height(kShelfSize); |
+ else |
+ status_size.set_width(kShelfSize); |
+ } |
target_bounds->status_bounds_in_shelf = SelectValueForShelfAlignment( |
gfx::Rect(base::i18n::IsRTL() ? 0 : shelf_width - status_size.width(), |
@@ -882,7 +887,7 @@ void ShelfLayoutManager::UpdateTargetBoundsForGesture( |
} |
if (ash::switches::UseAlternateShelfLayout()) { |
- target_bounds->status_bounds_in_shelf.set_y(kStatusAreaInset); |
+ target_bounds->status_bounds_in_shelf.set_y(0); |
} else { |
// The statusbar should be in the center of the shelf. |
gfx::Rect status_y = target_bounds->shelf_bounds_in_root; |
@@ -907,12 +912,12 @@ void ShelfLayoutManager::UpdateTargetBoundsForGesture( |
} |
if (ash::switches::UseAlternateShelfLayout()) { |
- if (right_aligned) { |
- target_bounds->status_bounds_in_shelf.set_x(kStatusAreaInset); |
- } else { |
+ if (right_aligned) |
+ target_bounds->status_bounds_in_shelf.set_x(0); |
+ else |
target_bounds->status_bounds_in_shelf.set_x( |
- available_bounds.right() - shelf_width + kStatusAreaInset); |
- } |
+ target_bounds->shelf_bounds_in_root.width() - |
+ kShelfSize); |
} else { |
// The statusbar should be in the center of the shelf. |
gfx::Rect status_x = target_bounds->shelf_bounds_in_root; |