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/system/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell/panel_window.h" | 8 #include "ash/shell/panel_window.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
400 clock_observer_(NULL), | 400 clock_observer_(NULL), |
401 ime_observer_(NULL), | 401 ime_observer_(NULL), |
402 network_observer_(NULL), | 402 network_observer_(NULL), |
403 power_status_observer_(NULL), | 403 power_status_observer_(NULL), |
404 update_observer_(NULL), | 404 update_observer_(NULL), |
405 user_observer_(NULL), | 405 user_observer_(NULL), |
406 bubble_(NULL), | 406 bubble_(NULL), |
407 popup_(NULL) { | 407 popup_(NULL) { |
408 container_ = new views::View; | 408 container_ = new views::View; |
409 container_->SetLayoutManager(new views::BoxLayout( | 409 container_->SetLayoutManager(new views::BoxLayout( |
410 views::BoxLayout::kHorizontal, 5, 0, kTrayPaddingBetweenItems)); | 410 views::BoxLayout::kHorizontal, 1, 1, kTrayPaddingBetweenItems)); |
sadrul
2012/03/21 21:26:15
The lack of horizontal padding on the left looks .
flackr
2012/03/21 23:19:05
Fixed, thanks for the tip.
| |
411 container_->set_background(new SystemTrayBackground); | 411 container_->set_background(new SystemTrayBackground); |
412 set_border(views::Border::CreateEmptyBorder(0, 0, | 412 set_border(views::Border::CreateEmptyBorder(0, 0, |
413 kPaddingFromBottomOfScreen, kPaddingFromRightEdgeOfScreen)); | 413 kPaddingFromBottomOfScreen, kPaddingFromRightEdgeOfScreen)); |
414 set_notify_enter_exit_on_child(true); | 414 set_notify_enter_exit_on_child(true); |
415 set_focusable(true); | 415 set_focusable(true); |
416 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); | 416 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); |
417 AddChildView(container_); | 417 AddChildView(container_); |
418 } | 418 } |
419 | 419 |
420 SystemTray::~SystemTray() { | 420 SystemTray::~SystemTray() { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
558 views::View::OnPaintFocusBorder(canvas); | 558 views::View::OnPaintFocusBorder(canvas); |
559 } | 559 } |
560 | 560 |
561 void SystemTray::OnWidgetClosing(views::Widget* widget) { | 561 void SystemTray::OnWidgetClosing(views::Widget* widget) { |
562 CHECK_EQ(popup_, widget); | 562 CHECK_EQ(popup_, widget); |
563 popup_ = NULL; | 563 popup_ = NULL; |
564 bubble_ = NULL; | 564 bubble_ = NULL; |
565 } | 565 } |
566 | 566 |
567 } // namespace ash | 567 } // namespace ash |
OLD | NEW |