Commit fa72c66b authored by Daniel Zhang's avatar Daniel Zhang Committed by Commit Bot

Enlarged and changed the style of pagination indicators.

1. Pagination buttons were enlarged from 4dip radius to 5dip radius
2. Pagination button stroke width was changed to 2dip from 1dip
3. Removed padding between buttons
4. Enlarged InkDrop radius.

Bug: 856678
Change-Id: Ie4754848373a635a045c7366462e6bcde0499194
Reviewed-on: https://chromium-review.googlesource.com/1114306
Commit-Queue: Daniel Zhang <oxyflush@google.com>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Reviewed-by: default avatarJenny Zhang <jennyz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571179}
parent e2bd02ff
...@@ -32,25 +32,26 @@ namespace app_list { ...@@ -32,25 +32,26 @@ namespace app_list {
namespace { namespace {
constexpr int kNormalButtonRadius = 3; constexpr int kNormalButtonRadius = 4;
constexpr int kSelectedButtonRadius = 4; constexpr int kSelectedButtonRadius = 5;
constexpr int kInkDropRadius = 8; constexpr int kInkDropRadius = 16;
constexpr int kMaxButtonRadius = 8; constexpr int kMaxButtonRadius = 16;
constexpr int kPreferredButtonStripWidth = kMaxButtonRadius * 2; constexpr int kPreferredButtonStripWidth = kMaxButtonRadius * 2;
constexpr SkScalar kStrokeWidth = SkIntToScalar(1); constexpr SkScalar kStrokeWidth = SkIntToScalar(2);
// Constants for the button strip that grows vertically. // Constants for the button strip that grows vertically.
// The padding on top/bottom side of each button. // The padding on top/bottom side of each button.
constexpr int kVerticalButtonPadding = 12; constexpr int kVerticalButtonPadding = 0;
// The selected button color. // The selected button color.
constexpr SkColor kVerticalSelectedButtonColor = SK_ColorWHITE; constexpr SkColor kVerticalSelectedButtonColor =
SkColorSetARGB(255, 232, 234, 237);
// The normal button color (54% white). // The normal button color (54% white).
constexpr SkColor kVerticalNormalColor = SkColorSetA(SK_ColorWHITE, 138); constexpr SkColor kVerticalNormalColor = SkColorSetARGB(255, 232, 234, 237);
constexpr SkColor kVerticalInkDropBaseColor = SK_ColorWHITE; constexpr SkColor kVerticalInkDropBaseColor = SkColorSetRGB(241, 243, 244);
constexpr SkColor kVerticalInkDropRippleColor = constexpr SkColor kVerticalInkDropRippleColor =
SkColorSetA(kVerticalInkDropBaseColor, 20);
constexpr SkColor kVerticalInkDropHighlightColor =
SkColorSetA(kVerticalInkDropBaseColor, 15); SkColorSetA(kVerticalInkDropBaseColor, 15);
constexpr SkColor kVerticalInkDropHighlightColor =
SkColorSetA(kVerticalInkDropBaseColor, 20);
// Constants for the button strip that grows horizontally. // Constants for the button strip that grows horizontally.
// The padding on left/right side of each button. // The padding on left/right side of each button.
...@@ -91,7 +92,7 @@ class PageSwitcherButton : public views::Button { ...@@ -91,7 +92,7 @@ class PageSwitcherButton : public views::Button {
std::unique_ptr<views::InkDrop> CreateInkDrop() override { std::unique_ptr<views::InkDrop> CreateInkDrop() override {
std::unique_ptr<views::InkDropImpl> ink_drop = std::unique_ptr<views::InkDropImpl> ink_drop =
Button::CreateDefaultInkDropImpl(); Button::CreateDefaultInkDropImpl();
ink_drop->SetShowHighlightOnHover(false); ink_drop->SetShowHighlightOnHover(true);
ink_drop->SetAutoHighlightMode( ink_drop->SetAutoHighlightMode(
views::InkDropImpl::AutoHighlightMode::SHOW_ON_RIPPLE); views::InkDropImpl::AutoHighlightMode::SHOW_ON_RIPPLE);
return std::move(ink_drop); return std::move(ink_drop);
...@@ -99,7 +100,7 @@ class PageSwitcherButton : public views::Button { ...@@ -99,7 +100,7 @@ class PageSwitcherButton : public views::Button {
std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override { std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override {
return std::make_unique<views::CircleInkDropMask>( return std::make_unique<views::CircleInkDropMask>(
size(), GetLocalBounds().CenterPoint(), kMaxButtonRadius); size(), GetLocalBounds().CenterPoint(), kInkDropRadius);
} }
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override { std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
...@@ -162,6 +163,7 @@ class PageSwitcherButton : public views::Button { ...@@ -162,6 +163,7 @@ class PageSwitcherButton : public views::Button {
flags.setAntiAlias(true); flags.setAntiAlias(true);
flags.setStyle(info.style); flags.setStyle(info.style);
flags.setColor(info.color); flags.setColor(info.color);
flags.setStrokeWidth(info.stroke_width);
canvas->DrawPath(path, flags); canvas->DrawPath(path, flags);
} }
......
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