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

Unified Diff: ash/shelf/shelf_view.cc

Issue 302653008: Moving default minimize location to the app launcher item. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding the functionality to return the overflow button as target if needed Created 6 years, 7 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/shelf/shelf_view.h ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 1cc1cf61203d2e22519615086d8dfb21a5564d52..651cdff0a09e0004c4f9d70a72b4d3db9a261d0f 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -454,9 +454,11 @@ void ShelfView::SchedulePaintForAllButtons() {
gfx::Rect ShelfView::GetIdealBoundsOfItemIcon(ShelfID id) {
int index = model_->ItemIndexByID(id);
- if (index == -1 || (index > last_visible_index_ &&
- index < model_->FirstPanelIndex()))
+ if (index == -1)
return gfx::Rect();
+ // Map all items from overflow area to the overflow button.
+ if (index > last_visible_index_ && index < model_->FirstPanelIndex())
flackr 2014/05/29 17:05:01 Does this currently work for overflowed panels? Or
Mr4D (OOO till 08-26) 2014/05/29 20:09:51 Yes - and no. Updated comment. But in the essence
+ index = last_visible_index_ + 1;
const gfx::Rect& ideal_bounds(view_model_->ideal_bounds(index));
DCHECK_NE(TYPE_APP_LIST, model_->items()[index].type);
ShelfButton* button = static_cast<ShelfButton*>(view_model_->view_at(index));
« no previous file with comments | « ash/shelf/shelf_view.h ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698