OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/panels/panel_layout_manager.h" | 5 #include "ash/wm/panels/panel_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 namespace { | 38 namespace { |
39 const int kPanelMarginEdge = 4; | 39 const int kPanelMarginEdge = 4; |
40 const int kPanelMarginMiddle = 8; | 40 const int kPanelMarginMiddle = 8; |
41 const int kPanelIdealSpacing = 4; | 41 const int kPanelIdealSpacing = 4; |
42 | 42 |
43 const float kMaxHeightFactor = .80f; | 43 const float kMaxHeightFactor = .80f; |
44 const float kMaxWidthFactor = .50f; | 44 const float kMaxWidthFactor = .50f; |
45 | 45 |
46 // Callout arrow dimensions. | 46 // Callout arrow dimensions. |
47 const int kArrowWidth = 20; | 47 const int kArrowWidth = 18; |
48 const int kArrowHeight = 10; | 48 const int kArrowHeight = 9; |
49 | 49 |
50 class CalloutWidgetBackground : public views::Background { | 50 class CalloutWidgetBackground : public views::Background { |
51 public: | 51 public: |
52 CalloutWidgetBackground() : alignment_(SHELF_ALIGNMENT_BOTTOM) { | 52 CalloutWidgetBackground() : alignment_(SHELF_ALIGNMENT_BOTTOM) { |
53 } | 53 } |
54 | 54 |
55 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE { | 55 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE { |
56 SkPath path; | 56 SkPath path; |
57 switch (alignment_) { | 57 switch (alignment_) { |
58 case SHELF_ALIGNMENT_BOTTOM: | 58 case SHELF_ALIGNMENT_BOTTOM: |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 | 617 |
618 SetChildBoundsDirect(callout_widget->GetNativeWindow(), callout_bounds); | 618 SetChildBoundsDirect(callout_widget->GetNativeWindow(), callout_bounds); |
619 panel_container_->StackChildAbove(callout_widget->GetNativeWindow(), | 619 panel_container_->StackChildAbove(callout_widget->GetNativeWindow(), |
620 panel); | 620 panel); |
621 callout_widget->Show(); | 621 callout_widget->Show(); |
622 } | 622 } |
623 } | 623 } |
624 | 624 |
625 } // namespace internal | 625 } // namespace internal |
626 } // namespace ash | 626 } // namespace ash |
OLD | NEW |