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

Unified Diff: ash/shelf/overflow_button.cc

Issue 23928004: ash:Shelf - Update position and hit box of status area. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: maybe 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/shelf/alternate_app_list_button.cc ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/overflow_button.cc
diff --git a/ash/shelf/overflow_button.cc b/ash/shelf/overflow_button.cc
index 23de9759d160fdc47906943199ebe8fd076a41d1..4f8becc52f7d7877e756cff984a8387bee5334e9 100644
--- a/ash/shelf/overflow_button.cc
+++ b/ash/shelf/overflow_button.cc
@@ -34,10 +34,6 @@ const int kButtonHoverSize = 28;
const int kBackgroundOffset = (48 - kButtonHoverSize) / 2;
-// Padding from the inner edge of the shelf (towards center of display) to
-// the edge of the background image of the overflow button.
-const int kImagePaddingFromShelf = 5;
-
} // namesapce
OverflowButton::OverflowButton(views::ButtonListener* listener)
@@ -108,18 +104,19 @@ void OverflowButton::OnPaint(gfx::Canvas* canvas) {
rb.GetImageNamed(background_image_id).ToImageSkia();
if (alignment == SHELF_ALIGNMENT_LEFT) {
bounds = gfx::Rect(
- bounds.right() - background->width() - kImagePaddingFromShelf,
+ bounds.right() - background->width() -
+ ShelfLayoutManager::kShelfItemInset,
bounds.y() + (bounds.height() - background->height()) / 2,
background->width(), background->height());
} else if (alignment == SHELF_ALIGNMENT_RIGHT) {
bounds = gfx::Rect(
- bounds.x() + kImagePaddingFromShelf,
+ bounds.x() + ShelfLayoutManager::kShelfItemInset,
bounds.y() + (bounds.height() - background->height()) / 2,
background->width(), background->height());
} else {
bounds = gfx::Rect(
bounds.x() + (bounds.width() - background->width()) / 2,
- bounds.y() + kImagePaddingFromShelf,
+ bounds.y() + ShelfLayoutManager::kShelfItemInset,
background->width(), background->height());
}
canvas->DrawImageInt(*background, bounds.x(), bounds.y());
« no previous file with comments | « ash/shelf/alternate_app_list_button.cc ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698