| 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 "ui/views/bubble/bubble_frame_view.h" | 5 #include "ui/views/bubble/bubble_frame_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const SkColor kFootnoteBackgroundColor = SkColorSetRGB(245, 245, 245); | 43 const SkColor kFootnoteBackgroundColor = SkColorSetRGB(245, 245, 245); |
| 44 | 44 |
| 45 // Color of the top border of the footnote. | 45 // Color of the top border of the footnote. |
| 46 const SkColor kFootnoteBorderColor = SkColorSetRGB(229, 229, 229); | 46 const SkColor kFootnoteBorderColor = SkColorSetRGB(229, 229, 229); |
| 47 | 47 |
| 48 constexpr int kClosePaddingRight = 7; | 48 constexpr int kClosePaddingRight = 7; |
| 49 constexpr int kClosePaddingTop = 7; | 49 constexpr int kClosePaddingTop = 7; |
| 50 | 50 |
| 51 // The MD spec states that the center of the "x" should be 16x16 from the top | 51 // The MD spec states that the center of the "x" should be 16x16 from the top |
| 52 // right of the dialog. | 52 // right of the dialog. |
| 53 constexpr int kClosePaddingRightMd = 4; | 53 constexpr int kClosePaddingRightMd = 8; |
| 54 constexpr int kClosePaddingTopMd = 4; | 54 constexpr int kClosePaddingTopMd = 8; |
| 55 | 55 |
| 56 // Get the |vertical| or horizontal amount that |available_bounds| overflows | 56 // Get the |vertical| or horizontal amount that |available_bounds| overflows |
| 57 // |window_bounds|. | 57 // |window_bounds|. |
| 58 int GetOffScreenLength(const gfx::Rect& available_bounds, | 58 int GetOffScreenLength(const gfx::Rect& available_bounds, |
| 59 const gfx::Rect& window_bounds, | 59 const gfx::Rect& window_bounds, |
| 60 bool vertical) { | 60 bool vertical) { |
| 61 if (available_bounds.IsEmpty() || available_bounds.Contains(window_bounds)) | 61 if (available_bounds.IsEmpty() || available_bounds.Contains(window_bounds)) |
| 62 return 0; | 62 return 0; |
| 63 | 63 |
| 64 // window_bounds | 64 // window_bounds |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 size.Enlarge(client_insets.width(), client_insets.height()); | 541 size.Enlarge(client_insets.width(), client_insets.height()); |
| 542 size.SetToMax(gfx::Size(title_bar_width, 0)); | 542 size.SetToMax(gfx::Size(title_bar_width, 0)); |
| 543 | 543 |
| 544 if (footnote_container_) | 544 if (footnote_container_) |
| 545 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); | 545 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); |
| 546 | 546 |
| 547 return size; | 547 return size; |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace views | 550 } // namespace views |
| OLD | NEW |