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

Side by Side Diff: ash/shelf/overflow_bubble_view.cc

Issue 1866403005: Fix rtl shelf overflow bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small review fixes (and merge) Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/overflow_bubble_view.h" 5 #include "ash/shelf/overflow_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
(...skipping 25 matching lines...) Expand all
36 OverflowBubbleView::OverflowBubbleView() : shelf_view_(NULL) {} 36 OverflowBubbleView::OverflowBubbleView() : shelf_view_(NULL) {}
37 37
38 OverflowBubbleView::~OverflowBubbleView() {} 38 OverflowBubbleView::~OverflowBubbleView() {}
39 39
40 void OverflowBubbleView::InitOverflowBubble(views::View* anchor, 40 void OverflowBubbleView::InitOverflowBubble(views::View* anchor,
41 ShelfView* shelf_view) { 41 ShelfView* shelf_view) {
42 shelf_view_ = shelf_view; 42 shelf_view_ = shelf_view;
43 43
44 SetAnchorView(anchor); 44 SetAnchorView(anchor);
45 set_arrow(GetBubbleArrow()); 45 set_arrow(GetBubbleArrow());
46 set_mirror_arrow_in_rtl(false);
46 set_background(NULL); 47 set_background(NULL);
47 set_color(SkColorSetARGB(wm::kShelfBackgroundAlpha, 0, 0, 0)); 48 set_color(SkColorSetARGB(wm::kShelfBackgroundAlpha, 0, 0, 0));
48 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); 49 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding));
49 // Overflow bubble should not get focus. If it get focus when it is shown, 50 // Overflow bubble should not get focus. If it get focus when it is shown,
50 // active state item is changed to running state. 51 // active state item is changed to running state.
51 set_can_activate(false); 52 set_can_activate(false);
52 53
53 // Makes bubble view has a layer and clip its children layers. 54 // Makes bubble view has a layer and clip its children layers.
54 SetPaintToLayer(true); 55 SetPaintToLayer(true);
55 layer()->SetFillsBoundsOpaquely(false); 56 layer()->SetFillsBoundsOpaquely(false);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 208
208 bubble_rect.Offset(0, offset); 209 bubble_rect.Offset(0, offset);
209 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); 210 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
210 } 211 }
211 212
212 GetBubbleFrameView()->SchedulePaint(); 213 GetBubbleFrameView()->SchedulePaint();
213 return bubble_rect; 214 return bubble_rect;
214 } 215 }
215 216
216 } // namespace ash 217 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698