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

Unified Diff: ash/shelf/shelf_view.cc

Issue 2823133002: Clean up some ash constants. (Closed)
Patch Set: ditto Created 3 years, 8 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_layout_manager_unittest.cc ('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 ed9850e7d232e0684877b1fa47a5eb6ede82b507..c4641b9517514f37103abcea92dad4458b68e098 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -1342,11 +1342,9 @@ gfx::Rect ShelfView::GetBoundsForDragInsertInScreen() {
}
if (wm_shelf_->IsHorizontalAlignment()) {
- preferred_size =
- gfx::Size(last_button_bounds.right(), GetShelfConstant(SHELF_SIZE));
+ preferred_size = gfx::Size(last_button_bounds.right(), kShelfSize);
} else {
- preferred_size =
- gfx::Size(GetShelfConstant(SHELF_SIZE), last_button_bounds.bottom());
+ preferred_size = gfx::Size(kShelfSize, last_button_bounds.bottom());
}
}
gfx::Point origin(GetMirroredXWithWidthInView(0, preferred_size.width()), 0);
@@ -1395,7 +1393,6 @@ int ShelfView::CancelDrag(int modified_index) {
gfx::Size ShelfView::GetPreferredSize() const {
gfx::Rect overflow_bounds;
CalculateIdealBounds(&overflow_bounds);
- const int shelf_size = GetShelfConstant(SHELF_SIZE);
int last_button_index = last_visible_index_;
if (!is_overflow_mode()) {
@@ -1418,12 +1415,12 @@ gfx::Size ShelfView::GetPreferredSize() const {
const gfx::Rect last_button_bounds =
last_button_index >= first_visible_index_
? view_model_->ideal_bounds(last_button_index)
- : gfx::Rect(gfx::Size(shelf_size, shelf_size));
+ : gfx::Rect(gfx::Size(kShelfSize, kShelfSize));
if (wm_shelf_->IsHorizontalAlignment())
- return gfx::Size(last_button_bounds.right(), shelf_size);
+ return gfx::Size(last_button_bounds.right(), kShelfSize);
- return gfx::Size(shelf_size, last_button_bounds.bottom());
+ return gfx::Size(kShelfSize, last_button_bounds.bottom());
}
void ShelfView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698