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

Unified Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2527513002: Update ash shelf/tray focus rects. (Closed)
Patch Set: fixes Created 4 years, 1 month 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
Index: ash/common/system/chromeos/palette/palette_tray.cc
diff --git a/ash/common/system/chromeos/palette/palette_tray.cc b/ash/common/system/chromeos/palette/palette_tray.cc
index 5e5d9501c212871fe7ac1c1a1a04b20d29b952eb..f7edbd6fb8cad1bcd45b739d7ecfbeed1e6faca4 100644
--- a/ash/common/system/chromeos/palette/palette_tray.cc
+++ b/ash/common/system/chromeos/palette/palette_tray.cc
@@ -11,11 +11,11 @@
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/chromeos/palette/palette_tool_manager.h"
#include "ash/common/system/chromeos/palette/palette_utils.h"
+#include "ash/common/system/tray/system_menu_button.h"
#include "ash/common/system/tray/system_tray_controller.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_bubble_wrapper.h"
#include "ash/common/system/tray/tray_constants.h"
-#include "ash/common/system/tray/tray_popup_header_button.h"
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
@@ -105,21 +105,14 @@ class TitleView : public views::View, public views::ButtonListener {
AddChildView(text_label);
box_layout->SetFlexForView(text_label, 1);
- gfx::ImageSkia settings_icon =
- gfx::CreateVectorIcon(kSystemMenuSettingsIcon, kMenuIconColor);
- gfx::ImageSkia help_icon =
- gfx::CreateVectorIcon(kSystemMenuHelpIcon, kMenuIconColor);
-
- help_button_ = new ash::TrayPopupHeaderButton(this, help_icon,
- IDS_ASH_STATUS_TRAY_HELP);
- help_button_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_HELP));
+ help_button_ =
+ new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED,
+ kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP);
AddChildView(help_button_);
- settings_button_ = new ash::TrayPopupHeaderButton(
- this, settings_icon, IDS_ASH_STATUS_TRAY_SETTINGS);
- settings_button_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SETTINGS));
+ settings_button_ = new SystemMenuButton(
+ this, TrayPopupInkDropStyle::HOST_CENTERED, kSystemMenuSettingsIcon,
+ IDS_ASH_STATUS_TRAY_SETTINGS);
tdanderson 2016/11/23 02:19:07 Actually I would hold off on touching the palette
Evan Stade 2016/11/28 19:05:53 Done.
tdanderson 2016/11/29 18:58:34 Just double checked and the palette should indeed
AddChildView(settings_button_);
}
@@ -145,8 +138,8 @@ class TitleView : public views::View, public views::ButtonListener {
// Unowned pointers to button views so we can determine which button was
// clicked.
- ash::TrayPopupHeaderButton* settings_button_;
- ash::TrayPopupHeaderButton* help_button_;
+ views::Button* settings_button_;
+ views::Button* help_button_;
PaletteTray* palette_tray_;
DISALLOW_COPY_AND_ASSIGN(TitleView);
@@ -262,7 +255,7 @@ bool PaletteTray::ShowPalette() {
bubble_view->AddChildView(view.view);
// Show the bubble.
- bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view));
+ bubble_.reset(new TrayBubbleWrapper(this, bubble_view));
SetIsActive(true);
return true;
}
@@ -408,7 +401,7 @@ void PaletteTray::SetIconBorderForShelfAlignment() {
void PaletteTray::UpdateTrayIcon() {
icon_->SetImage(CreateVectorIcon(
palette_tool_manager_->GetActiveTrayIcon(
- palette_tool_manager_->GetActiveTool(ash::PaletteGroup::MODE)),
+ palette_tool_manager_->GetActiveTool(PaletteGroup::MODE)),
kShelfIconSize, kShelfIconColor));
}

Powered by Google App Engine
This is Rietveld 408576698