| 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/common/system/status_area_widget_delegate.h" | 5 #include "ash/common/system/status_area_widget_delegate.h" |
| 6 | 6 |
| 7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
| 8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
| 9 #include "ash/common/focus_cycler.h" | 9 #include "ash/common/focus_cycler.h" |
| 10 #include "ash/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } else { // SHELF_ALIGNMENT_RIGHT | 224 } else { // SHELF_ALIGNMENT_RIGHT |
| 225 top_edge = 0; | 225 top_edge = 0; |
| 226 left_edge = kShelfItemInset; | 226 left_edge = kShelfItemInset; |
| 227 bottom_edge = | 227 bottom_edge = |
| 228 on_edge ? GetTrayConstant(TRAY_PADDING_FROM_EDGE_OF_SHELF) : 0; | 228 on_edge ? GetTrayConstant(TRAY_PADDING_FROM_EDGE_OF_SHELF) : 0; |
| 229 right_edge = shelf_size - kShelfItemInset - item_height; | 229 right_edge = shelf_size - kShelfItemInset - item_height; |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 child->SetBorder(views::Border::CreateEmptyBorder(top_edge, left_edge, | 232 child->SetBorder(views::Border::CreateEmptyBorder(top_edge, left_edge, |
| 233 bottom_edge, right_edge)); | 233 bottom_edge, right_edge)); |
| 234 // Layout on |child| needs to be updated based on new border value before |
| 235 // displaying; otherwise |child| will be showing with old border size. |
| 236 // Fix for crbug.com/623438. |
| 237 child->Layout(); |
| 234 } | 238 } |
| 235 | 239 |
| 236 } // namespace ash | 240 } // namespace ash |
| OLD | NEW |