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

Side by Side Diff: ui/message_center/views/padded_button.cc

Issue 2734933006: Show the settings button on a pinned notification. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/message_center/views/padded_button.h" 5 #include "ui/message_center/views/padded_button.h"
6 6
7 #include "ui/base/resource/resource_bundle.h" 7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 #include "ui/message_center/message_center_style.h" 9 #include "ui/message_center/message_center_style.h"
10 #include "ui/views/animation/flood_fill_ink_drop_ripple.h" 10 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
(...skipping 11 matching lines...) Expand all
22 SetFocusPainter(views::Painter::CreateSolidFocusPainter( 22 SetFocusPainter(views::Painter::CreateSolidFocusPainter(
23 kFocusBorderColor, 23 kFocusBorderColor,
24 gfx::Insets(1, 2, 2, 2))); 24 gfx::Insets(1, 2, 2, 2)));
25 set_background(views::Background::CreateSolidBackground( 25 set_background(views::Background::CreateSolidBackground(
26 SkColorSetA(SK_ColorWHITE, 0.9 * 0xff))); 26 SkColorSetA(SK_ColorWHITE, 0.9 * 0xff)));
27 SetBorder(views::CreateEmptyBorder(gfx::Insets(kControlButtonBorderSize))); 27 SetBorder(views::CreateEmptyBorder(gfx::Insets(kControlButtonBorderSize)));
28 set_animate_on_state_change(false); 28 set_animate_on_state_change(false);
29 29
30 SetInkDropMode(InkDropMode::ON); 30 SetInkDropMode(InkDropMode::ON);
31 set_ink_drop_base_color(SkColorSetA(SK_ColorBLACK, 0.6 * 0xff)); 31 set_ink_drop_base_color(SkColorSetA(SK_ColorBLACK, 0.6 * 0xff));
32 set_has_ink_drop_action_on_click(true);
32 } 33 }
33 34
34 std::unique_ptr<views::InkDrop> PaddedButton::CreateInkDrop() { 35 std::unique_ptr<views::InkDrop> PaddedButton::CreateInkDrop() {
35 auto ink_drop = CreateDefaultInkDropImpl(); 36 auto ink_drop = CreateDefaultInkDropImpl();
36 ink_drop->SetShowHighlightOnHover(false); 37 ink_drop->SetShowHighlightOnHover(false);
37 ink_drop->SetShowHighlightOnFocus(false); 38 ink_drop->SetShowHighlightOnFocus(false);
38 return std::move(ink_drop); 39 return std::move(ink_drop);
39 } 40 }
40 41
41 std::unique_ptr<views::InkDropRipple> PaddedButton::CreateInkDropRipple() 42 std::unique_ptr<views::InkDropRipple> PaddedButton::CreateInkDropRipple()
42 const { 43 const {
43 return base::MakeUnique<views::FloodFillInkDropRipple>( 44 return base::MakeUnique<views::FloodFillInkDropRipple>(
44 size(), GetInkDropCenterBasedOnLastEvent(), 45 size(), GetInkDropCenterBasedOnLastEvent(),
45 SkColorSetA(SK_ColorBLACK, 0.6 * 255), ink_drop_visible_opacity()); 46 SkColorSetA(SK_ColorBLACK, 0.6 * 255), ink_drop_visible_opacity());
46 } 47 }
47 48
48 } // namespace message_center 49 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698