| 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/tray/tray_details_view.h" | 5 #include "ash/common/system/tray/tray_details_view.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_view_ids.h" | 7 #include "ash/common/ash_view_ids.h" |
| 8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
| 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| 10 #include "ash/common/system/tray/system_menu_button.h" | 10 #include "ash/common/system/tray/system_menu_button.h" |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 529 |
| 530 if (scroller_) { | 530 if (scroller_) { |
| 531 scroller_->set_fixed_size(gfx::Size()); | 531 scroller_->set_fixed_size(gfx::Size()); |
| 532 gfx::Size size = GetPreferredSize(); | 532 gfx::Size size = GetPreferredSize(); |
| 533 | 533 |
| 534 // Set the scroller to fill the space above the bottom row, so that the | 534 // Set the scroller to fill the space above the bottom row, so that the |
| 535 // bottom row of the detailed view will always stay just above the title | 535 // bottom row of the detailed view will always stay just above the title |
| 536 // row. | 536 // row. |
| 537 gfx::Size scroller_size = scroll_content_->GetPreferredSize(); | 537 gfx::Size scroller_size = scroll_content_->GetPreferredSize(); |
| 538 scroller_->set_fixed_size( | 538 scroller_->set_fixed_size( |
| 539 gfx::Size(width() + scroller_->GetScrollBarWidth(), | 539 gfx::Size(width() + scroller_->GetScrollBarLayoutWidth(), |
| 540 scroller_size.height() - (size.height() - height()))); | 540 scroller_size.height() - (size.height() - height()))); |
| 541 } | 541 } |
| 542 | 542 |
| 543 views::View::Layout(); | 543 views::View::Layout(); |
| 544 | 544 |
| 545 if (title_row_) { | 545 if (title_row_) { |
| 546 // Always make sure the title row is bottom-aligned in non-MD. | 546 // Always make sure the title row is bottom-aligned in non-MD. |
| 547 gfx::Rect fbounds = title_row_->bounds(); | 547 gfx::Rect fbounds = title_row_->bounds(); |
| 548 fbounds.set_y(height() - title_row_->height()); | 548 fbounds.set_y(height() - title_row_->height()); |
| 549 title_row_->SetBoundsRect(fbounds); | 549 title_row_->SetBoundsRect(fbounds); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 566 if (index < child_count() - 1 && child_at(index + 1) != title_row_) | 566 if (index < child_count() - 1 && child_at(index + 1) != title_row_) |
| 567 scroll_border_->set_visible(true); | 567 scroll_border_->set_visible(true); |
| 568 else | 568 else |
| 569 scroll_border_->set_visible(false); | 569 scroll_border_->set_visible(false); |
| 570 } | 570 } |
| 571 | 571 |
| 572 views::View::OnPaintBorder(canvas); | 572 views::View::OnPaintBorder(canvas); |
| 573 } | 573 } |
| 574 | 574 |
| 575 } // namespace ash | 575 } // namespace ash |
| OLD | NEW |