Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Unified Diff: ash/common/system/tray/tray_bar_button_with_title.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/tray/tray_background_view.cc ('k') | ash/common/system/tray/tray_bubble_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_bar_button_with_title.cc
diff --git a/ash/common/system/tray/tray_bar_button_with_title.cc b/ash/common/system/tray/tray_bar_button_with_title.cc
index 9cbf47409491abc487c929d8e22cbf55b8cfc713..1d8d48f66325a569e46cbf76837e390263a69ab5 100644
--- a/ash/common/system/tray/tray_bar_button_with_title.cc
+++ b/ash/common/system/tray/tray_bar_button_with_title.cc
@@ -18,14 +18,11 @@ namespace ash {
namespace {
const int kBarImagesActive[] = {
- IDR_SLIDER_ACTIVE_LEFT,
- IDR_SLIDER_ACTIVE_CENTER,
- IDR_SLIDER_ACTIVE_RIGHT,
+ IDR_SLIDER_ACTIVE_LEFT, IDR_SLIDER_ACTIVE_CENTER, IDR_SLIDER_ACTIVE_RIGHT,
};
const int kBarImagesDisabled[] = {
- IDR_SLIDER_DISABLED_LEFT,
- IDR_SLIDER_DISABLED_CENTER,
+ IDR_SLIDER_DISABLED_LEFT, IDR_SLIDER_DISABLED_CENTER,
IDR_SLIDER_DISABLED_RIGHT,
};
@@ -34,11 +31,10 @@ const int kBarImagesDisabled[] = {
class TrayBarButtonWithTitle::TrayBarButton : public views::View {
public:
TrayBarButton(const int bar_active_images[], const int bar_disabled_images[])
- : views::View(),
- bar_active_images_(bar_active_images),
- bar_disabled_images_(bar_disabled_images),
- painter_(new views::HorizontalPainter(bar_active_images_)){
- }
+ : views::View(),
+ bar_active_images_(bar_active_images),
+ bar_disabled_images_(bar_disabled_images),
+ painter_(new views::HorizontalPainter(bar_active_images_)) {}
~TrayBarButton() override {}
// Overriden from views::View:
@@ -76,8 +72,10 @@ TrayBarButtonWithTitle::TrayBarButtonWithTitle(views::ButtonListener* listener,
AddChildView(title_);
}
- image_height_ = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- kBarImagesActive[0]).ToImageSkia()->height();
+ image_height_ = ui::ResourceBundle::GetSharedInstance()
+ .GetImageNamed(kBarImagesActive[0])
+ .ToImageSkia()
+ ->height();
}
TrayBarButtonWithTitle::~TrayBarButtonWithTitle() {}
@@ -93,18 +91,13 @@ gfx::Size TrayBarButtonWithTitle::GetPreferredSize() const {
void TrayBarButtonWithTitle::Layout() {
gfx::Rect rect(GetContentsBounds());
int bar_image_y = rect.height() / 2 - image_height_ / 2;
- gfx::Rect bar_image_rect(rect.x(),
- bar_image_y,
- rect.width(),
- image_height_);
+ gfx::Rect bar_image_rect(rect.x(), bar_image_y, rect.width(), image_height_);
image_->SetBoundsRect(bar_image_rect);
if (title_) {
// The image_ has some empty space below the bar image, move the title
// a little bit up to look closer to the bar.
gfx::Size title_size = title_->GetPreferredSize();
- title_->SetBounds(rect.x(),
- bar_image_y + image_height_ - 3,
- rect.width(),
+ title_->SetBounds(rect.x(), bar_image_y + image_height_ - 3, rect.width(),
title_size.height());
}
}
« no previous file with comments | « ash/common/system/tray/tray_background_view.cc ('k') | ash/common/system/tray/tray_bubble_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698