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

Side by Side Diff: ash/system/tray/tray_item_more.cc

Issue 9753019: ash: Add a bluetooth entry in the uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/system/tray/tray_item_more.h"
6
7 #include "ash/system/tray/tray_constants.h"
8 #include "grit/ui_resources.h"
9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/image/image.h"
11 #include "ui/views/controls/image_view.h"
12
13 namespace ash {
14 namespace internal {
15
16 TrayItemMore::TrayItemMore()
17 : more_(NULL) {
18 }
19
20 TrayItemMore::~TrayItemMore() {
21 }
22
23 void TrayItemMore::AddMore() {
24 more_ = new views::ImageView;
25 more_->SetImage(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
26 IDR_AURA_UBER_TRAY_MORE).ToSkBitmap());
27 AddChildView(more_);
28 }
29
30 void TrayItemMore::Layout() {
31 // Let the box-layout do the layout first. Then move the '>' arrow to right
32 // align.
33 views::View::Layout();
34
35 gfx::Rect bounds = more_->bounds();
36 bounds.set_x(width() - more_->width() - kTrayPopupPaddingBetweenItems);
37 more_->SetBoundsRect(bounds);
38 }
39
40 } // namespace internal
41 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698