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

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: Created 7 years, 4 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
Index: ash/launcher/launcher_view.cc
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 1ec3e9461eb4df1e9175306d6f3402daab788881..86ba3970c5909dd758db1a78a8e9a562922c5295 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -792,7 +792,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)
James Cook 2013/08/22 00:19:12 Should this be part of a separate CL, or is it nee
Harry McCleave 2013/08/27 00:37:00 This fixes an issue asserted by a unit test, if th
--last_visible_index_;
for (int i = 0; i < view_model_->view_size(); ++i) {
bool visible = i <= last_visible_index_ || i > last_hidden_index_;
@@ -808,7 +808,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 {

Powered by Google App Engine
This is Rietveld 408576698