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

Unified Diff: ash/launcher/launcher_view.cc

Issue 22793011: ash:Shelf - Enable Alternate Shelf and Side Shelf by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | « ash/launcher/launcher_navigator_unittest.cc ('k') | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_view.cc
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index ce43c6085476789ad69c3e86d7b4756ff046b7b9..2e6f9dadb1090c83a9e6408c8b3871385fd31e13 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -805,7 +805,7 @@ void LauncherView::CalculateIdealBounds(IdealBounds* bounds) {
// Create Space for the overflow button
if (show_overflow && ash::switches::UseAlternateShelfLayout() &&
- last_visible_index_ > 0)
+ last_visible_index_ > 0 && last_visible_index_ < last_button_index)
--last_visible_index_;
for (int i = 0; i < view_model_->view_size(); ++i) {
bool visible = i <= last_visible_index_ || i > last_hidden_index_;
@@ -821,7 +821,8 @@ void LauncherView::CalculateIdealBounds(IdealBounds* bounds) {
if (last_visible_index_ == -1) {
x = shelf->SelectValueForShelfAlignment(inset, 0, 0, inset);
y = shelf->SelectValueForShelfAlignment(0, inset, inset, 0);
- } else if (last_visible_index_ == last_button_index) {
+ } else if (last_visible_index_ == last_button_index
+ && !ash::switches::UseAlternateShelfLayout()) {
x = view_model_->ideal_bounds(last_visible_index_).x();
y = view_model_->ideal_bounds(last_visible_index_).y();
} else {
« no previous file with comments | « ash/launcher/launcher_navigator_unittest.cc ('k') | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698