Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/audio/volume_view.h" | 5 #include "ash/common/system/chromeos/audio/volume_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/metrics/user_metrics_action.h" | 10 #include "ash/common/metrics/user_metrics_action.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 Update(); | 178 Update(); |
| 179 return; | 179 return; |
| 180 } | 180 } |
| 181 | 181 |
| 182 more_button_ = new ButtonListenerActionableView( | 182 more_button_ = new ButtonListenerActionableView( |
| 183 owner_, TrayPopupInkDropStyle::INSET_BOUNDS, this); | 183 owner_, TrayPopupInkDropStyle::INSET_BOUNDS, this); |
| 184 TrayPopupUtils::ConfigureContainer(TriView::Container::END, more_button_); | 184 TrayPopupUtils::ConfigureContainer(TriView::Container::END, more_button_); |
| 185 more_button_->SetFocusBehavior(FocusBehavior::NEVER); | 185 more_button_->SetFocusBehavior(FocusBehavior::NEVER); |
| 186 | 186 |
| 187 device_type_ = TrayPopupUtils::CreateMoreImageView(); | 187 device_type_ = TrayPopupUtils::CreateMoreImageView(); |
| 188 more_button_->SetBorder(views::CreateEmptyBorder(gfx::Insets( | 188 more_button_->SetBorder( |
| 189 0, GetTrayConstant(TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET)))); | 189 views::CreateEmptyBorder(gfx::Insets(0, kTrayPopupButtonEndMargin))); |
|
tdanderson
2017/02/28 17:08:18
nit: consider renaming to kTrayPopupButtonHorizont
Evan Stade
2017/03/01 04:28:54
I removed the docs, but horizontal margin is just
| |
| 190 more_button_->AddChildView(device_type_); | 190 more_button_->AddChildView(device_type_); |
| 191 | 191 |
| 192 views::ImageView* more_arrow = TrayPopupUtils::CreateMoreImageView(); | 192 views::ImageView* more_arrow = TrayPopupUtils::CreateMoreImageView(); |
| 193 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { | 193 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { |
| 194 more_arrow->SetImage( | 194 more_arrow->SetImage( |
| 195 gfx::CreateVectorIcon(kSystemMenuArrowRightIcon, kMenuIconColor)); | 195 gfx::CreateVectorIcon(kSystemMenuArrowRightIcon, kMenuIconColor)); |
| 196 } else { | 196 } else { |
| 197 more_arrow->SetImage(ui::ResourceBundle::GetSharedInstance() | 197 more_arrow->SetImage(ui::ResourceBundle::GetSharedInstance() |
| 198 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE) | 198 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE) |
| 199 .ToImageSkia()); | 199 .ToImageSkia()); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 344 void VolumeView::OnBoundsChanged(const gfx::Rect& previous_bounds) { | 344 void VolumeView::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
| 345 // Separator's prefered size is based on set bounds. When an empty bounds is | 345 // Separator's prefered size is based on set bounds. When an empty bounds is |
| 346 // set on first layout this causes BoxLayout to ignore the separator. Reset | 346 // set on first layout this causes BoxLayout to ignore the separator. Reset |
| 347 // its height on each bounds change so that it is laid out properly. | 347 // its height on each bounds change so that it is laid out properly. |
| 348 if (separator_) | 348 if (separator_) |
| 349 separator_->SetSize(gfx::Size(kSeparatorSize, bounds().height())); | 349 separator_->SetSize(gfx::Size(kSeparatorSize, bounds().height())); |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace tray | 352 } // namespace tray |
| 353 } // namespace ash | 353 } // namespace ash |
| OLD | NEW |