Commit b6ad5258 authored by Tatsuhisa Yamaguchi's avatar Tatsuhisa Yamaguchi Committed by Commit Bot

Unified: Change top shortcut button order for new spec.

Bug: 887017
Change-Id: Ic9ed47bc1bec79e598b0fe5cccc2aa83cc6d8b6f
Reviewed-on: https://chromium-review.googlesource.com/1235363Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592722}
parent 83c37fe1
...@@ -158,6 +158,13 @@ TopShortcutsView::TopShortcutsView(UnifiedSystemTrayController* controller) ...@@ -158,6 +158,13 @@ TopShortcutsView::TopShortcutsView(UnifiedSystemTrayController* controller)
sign_out_button_ = new SignOutButton(this); sign_out_button_ = new SignOutButton(this);
container_->AddSignOutButton(sign_out_button_); container_->AddSignOutButton(sign_out_button_);
bool reboot = Shell::Get()->shutdown_controller()->reboot_on_shutdown();
power_button_ = new TopShortcutButton(
this, kUnifiedMenuPowerIcon,
reboot ? IDS_ASH_STATUS_TRAY_REBOOT : IDS_ASH_STATUS_TRAY_SHUTDOWN);
power_button_->set_id(VIEW_ID_POWER_BUTTON);
container_->AddChildView(power_button_);
lock_button_ = new TopShortcutButton(this, kUnifiedMenuLockIcon, lock_button_ = new TopShortcutButton(this, kUnifiedMenuLockIcon,
IDS_ASH_STATUS_TRAY_LOCK); IDS_ASH_STATUS_TRAY_LOCK);
lock_button_->SetVisible(can_show_web_ui && lock_button_->SetVisible(can_show_web_ui &&
...@@ -169,13 +176,6 @@ TopShortcutsView::TopShortcutsView(UnifiedSystemTrayController* controller) ...@@ -169,13 +176,6 @@ TopShortcutsView::TopShortcutsView(UnifiedSystemTrayController* controller)
settings_button_->SetVisible(can_show_web_ui); settings_button_->SetVisible(can_show_web_ui);
container_->AddChildView(settings_button_); container_->AddChildView(settings_button_);
bool reboot = Shell::Get()->shutdown_controller()->reboot_on_shutdown();
power_button_ = new TopShortcutButton(
this, kUnifiedMenuPowerIcon,
reboot ? IDS_ASH_STATUS_TRAY_REBOOT : IDS_ASH_STATUS_TRAY_SHUTDOWN);
power_button_->set_id(VIEW_ID_POWER_BUTTON);
container_->AddChildView(power_button_);
// |collapse_button_| should be right-aligned, so we make the buttons // |collapse_button_| should be right-aligned, so we make the buttons
// container flex occupying all remaining space. // container flex occupying all remaining space.
layout->SetFlexForView(container_, 1); layout->SetFlexForView(container_, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment