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

Unified Diff: athena/system/background_controller.cc

Issue 483033003: [Athena] Add status icons and system time to the centered home card (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 | « athena/home/athena_start_page_view_unittest.cc ('k') | athena/system/public/system_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/system/background_controller.cc
diff --git a/athena/system/background_controller.cc b/athena/system/background_controller.cc
index f4d346a745b4d050405db64343fa0f72321dcf99..837596558994aeaeea0d3bcf8c5b1e902ab9088f 100644
--- a/athena/system/background_controller.cc
+++ b/athena/system/background_controller.cc
@@ -16,11 +16,10 @@ namespace athena {
class BackgroundView : public views::View {
public:
- BackgroundView()
- : time_view_(SystemUI::Get()->CreateTimeView()),
- status_icon_view_(SystemUI::Get()->CreateStatusIconView()) {
- AddChildView(time_view_);
- AddChildView(status_icon_view_);
+ BackgroundView() : system_info_view_(NULL) {
+ system_info_view_ =
+ SystemUI::Get()->CreateSystemInfoView(SystemUI::COLOR_SCHEME_LIGHT);
+ AddChildView(system_info_view_);
}
virtual ~BackgroundView() {}
@@ -31,18 +30,8 @@ class BackgroundView : public views::View {
// views::View:
virtual void Layout() OVERRIDE {
- time_view_->SetBoundsRect(gfx::Rect(time_view_->GetPreferredSize()));
- gfx::Size status_icon_preferred_size =
- status_icon_view_->GetPreferredSize();
- status_icon_view_->SetBounds(width() - status_icon_preferred_size.width(),
- 0,
- status_icon_preferred_size.width(),
- status_icon_preferred_size.height());
- }
-
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE {
- // Relayout when |status_icon_view_| changes its preferred size.
- Layout();
+ system_info_view_->SetBounds(
+ 0, 0, width(), system_info_view_->GetPreferredSize().height());
}
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
@@ -60,8 +49,7 @@ class BackgroundView : public views::View {
private:
gfx::ImageSkia image_;
- views::View* time_view_;
- views::View* status_icon_view_;
+ views::View* system_info_view_;
DISALLOW_COPY_AND_ASSIGN(BackgroundView);
};
« no previous file with comments | « athena/home/athena_start_page_view_unittest.cc ('k') | athena/system/public/system_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698