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

Unified Diff: ash/launcher/launcher_view.cc

Issue 10828184: ash: Update launcher overflow chevron. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix launcher_view_test_api compile Created 8 years, 4 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 | « ash/launcher/launcher_view.h ('k') | ash/launcher/overflow_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_view.cc
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index d277ad05f45f7d7ede797f6b9f6e55d522122f5d..fdcbdb0ba7abfa6a771c79ef2f9b220c7b9c9b14 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -13,6 +13,7 @@
#include "ash/launcher/launcher_model.h"
#include "ash/launcher/launcher_tooltip_manager.h"
#include "ash/launcher/overflow_bubble.h"
+#include "ash/launcher/overflow_button.h"
#include "ash/launcher/tabbed_launcher_button.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
@@ -293,7 +294,6 @@ LauncherView::~LauncherView() {
}
void LauncherView::Init() {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
model_->AddObserver(this);
const LauncherItems& items(model_->items());
@@ -305,21 +305,7 @@ void LauncherView::Init() {
}
UpdateFirstButtonPadding();
- overflow_button_ = new views::ImageButton(this);
- overflow_button_->set_accessibility_focusable(true);
- overflow_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_MIDDLE);
- overflow_button_->SetImage(
- views::CustomButton::BS_NORMAL,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToImageSkia());
- overflow_button_->SetImage(
- views::CustomButton::BS_HOT,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_HOT).ToImageSkia());
- overflow_button_->SetImage(
- views::CustomButton::BS_PUSHED,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_PUSHED).ToImageSkia());
- overflow_button_->SetAccessibleName(
- l10n_util::GetStringUTF16(IDS_AURA_LAUNCHER_OVERFLOW_NAME));
+ overflow_button_ = new OverflowButton(this);
overflow_button_->set_context_menu_controller(this);
ConfigureChildView(overflow_button_);
AddChildView(overflow_button_);
@@ -332,6 +318,7 @@ void LauncherView::SetAlignment(ShelfAlignment alignment) {
return;
alignment_ = alignment;
UpdateFirstButtonPadding();
+ overflow_button_->SetShelfAlignment(alignment_);
LayoutToIdealBounds();
tooltip_->SetArrowLocation(alignment_);
if (overflow_bubble_.get())
« no previous file with comments | « ash/launcher/launcher_view.h ('k') | ash/launcher/overflow_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698