| OLD | NEW |
| 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/system/tray/tray_bar_button_with_title.h" | 5 #include "ash/system/tray/tray_bar_button_with_title.h" |
| 6 | 6 |
| 7 #include "ash/system/tray/tray_constants.h" | 7 #include "ash/system/tray/tray_constants.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "grit/ui_resources.h" | 9 #include "grit/ui_resources.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| 11 #include "ui/gfx/image/image_skia.h" | 11 #include "ui/gfx/image/image_skia.h" |
| 12 #include "ui/views/controls/label.h" | 12 #include "ui/views/controls/label.h" |
| 13 #include "ui/views/painter.h" | 13 #include "ui/views/painter.h" |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 namespace internal { | |
| 17 | |
| 18 namespace { | 16 namespace { |
| 19 | 17 |
| 20 const int kBarImagesActive[] = { | 18 const int kBarImagesActive[] = { |
| 21 IDR_SLIDER_ACTIVE_LEFT, | 19 IDR_SLIDER_ACTIVE_LEFT, |
| 22 IDR_SLIDER_ACTIVE_CENTER, | 20 IDR_SLIDER_ACTIVE_CENTER, |
| 23 IDR_SLIDER_ACTIVE_RIGHT, | 21 IDR_SLIDER_ACTIVE_RIGHT, |
| 24 }; | 22 }; |
| 25 | 23 |
| 26 const int kBarImagesDisabled[] = { | 24 const int kBarImagesDisabled[] = { |
| 27 IDR_SLIDER_DISABLED_LEFT, | 25 IDR_SLIDER_DISABLED_LEFT, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // The image_ has some empty space below the bar image, move the title | 100 // The image_ has some empty space below the bar image, move the title |
| 103 // a little bit up to look closer to the bar. | 101 // a little bit up to look closer to the bar. |
| 104 gfx::Size title_size = title_->GetPreferredSize(); | 102 gfx::Size title_size = title_->GetPreferredSize(); |
| 105 title_->SetBounds(rect.x(), | 103 title_->SetBounds(rect.x(), |
| 106 bar_image_y + image_height_ - 3, | 104 bar_image_y + image_height_ - 3, |
| 107 rect.width(), | 105 rect.width(), |
| 108 title_size.height()); | 106 title_size.height()); |
| 109 } | 107 } |
| 110 } | 108 } |
| 111 | 109 |
| 112 } // namespace internal | |
| 113 } // namespace ash | 110 } // namespace ash |
| OLD | NEW |