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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 1752553002: [MD] Fix some ink drop colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 kButtonPaddingHorizontal)); 220 kButtonPaddingHorizontal));
221 return border; 221 return border;
222 } 222 }
223 223
224 bool IsTriggerableEvent(const ui::Event& e) override { 224 bool IsTriggerableEvent(const ui::Event& e) override {
225 return e.type() == ui::ET_GESTURE_TAP || 225 return e.type() == ui::ET_GESTURE_TAP ||
226 e.type() == ui::ET_GESTURE_TAP_DOWN || 226 e.type() == ui::ET_GESTURE_TAP_DOWN ||
227 event_utils::IsPossibleDispositionEvent(e); 227 event_utils::IsPossibleDispositionEvent(e);
228 } 228 }
229 229
230 SkColor GetInkDropBaseColor() const override {
Evan Stade 2016/03/01 00:23:37 Moving this here makes it apply to the app shortcu
231 return GetThemeProvider()->GetColor(
232 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
233 }
234
230 private: 235 private:
231 scoped_ptr<gfx::SlideAnimation> show_animation_; 236 scoped_ptr<gfx::SlideAnimation> show_animation_;
232 237
233 // Controls the visual feedback for the button state. 238 // Controls the visual feedback for the button state.
234 views::ButtonInkDropDelegate ink_drop_delegate_; 239 views::ButtonInkDropDelegate ink_drop_delegate_;
235 240
236 DISALLOW_COPY_AND_ASSIGN(BookmarkButtonBase); 241 DISALLOW_COPY_AND_ASSIGN(BookmarkButtonBase);
237 }; 242 };
238 243
239 // BookmarkButton ------------------------------------------------------------- 244 // BookmarkButton -------------------------------------------------------------
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 void BookmarkBarView::ConfigureButton(const BookmarkNode* node, 1694 void BookmarkBarView::ConfigureButton(const BookmarkNode* node,
1690 views::LabelButton* button) { 1695 views::LabelButton* button) {
1691 button->SetText(node->GetTitle()); 1696 button->SetText(node->GetTitle());
1692 button->SetAccessibleName(node->GetTitle()); 1697 button->SetAccessibleName(node->GetTitle());
1693 button->set_id(VIEW_ID_BOOKMARK_BAR_ELEMENT); 1698 button->set_id(VIEW_ID_BOOKMARK_BAR_ELEMENT);
1694 // We don't always have a theme provider (ui tests, for example). 1699 // We don't always have a theme provider (ui tests, for example).
1695 if (GetThemeProvider()) { 1700 if (GetThemeProvider()) {
1696 SkColor color = 1701 SkColor color =
1697 GetThemeProvider()->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT); 1702 GetThemeProvider()->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT);
1698 button->SetEnabledTextColors(color); 1703 button->SetEnabledTextColors(color);
1699 button->set_ink_drop_base_color(color_utils::DeriveDefaultIconColor(color));
1700 if (node->is_folder()) { 1704 if (node->is_folder()) {
1701 button->SetImage(views::Button::STATE_NORMAL, 1705 button->SetImage(views::Button::STATE_NORMAL,
1702 chrome::GetBookmarkFolderIcon(color)); 1706 chrome::GetBookmarkFolderIcon(color));
1703 } 1707 }
1704 } 1708 }
1705 1709
1706 button->SetMinSize(gfx::Size()); 1710 button->SetMinSize(gfx::Size());
1707 button->set_context_menu_controller(this); 1711 button->set_context_menu_controller(this);
1708 button->set_drag_controller(this); 1712 button->set_drag_controller(this);
1709 if (node->is_url()) { 1713 if (node->is_url()) {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 return; 2080 return;
2077 apps_page_shortcut_->SetVisible(visible); 2081 apps_page_shortcut_->SetVisible(visible);
2078 UpdateBookmarksSeparatorVisibility(); 2082 UpdateBookmarksSeparatorVisibility();
2079 LayoutAndPaint(); 2083 LayoutAndPaint();
2080 } 2084 }
2081 2085
2082 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2086 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2083 if (UpdateOtherAndManagedButtonsVisibility()) 2087 if (UpdateOtherAndManagedButtonsVisibility())
2084 LayoutAndPaint(); 2088 LayoutAndPaint();
2085 } 2089 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/app_menu_button.h » ('j') | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698