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

Unified Diff: ui/views/style/platform_style_mac.mm

Issue 2270933002: Harmony: disable ripples on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call superclass in StateChanged Created 4 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 | « ui/views/style/platform_style.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/platform_style_mac.mm
diff --git a/ui/views/style/platform_style_mac.mm b/ui/views/style/platform_style_mac.mm
index 125434971045848145dc052209c2985b4467b688..05d1127295dda66c93c3cef1c937b9f10f5306e5 100644
--- a/ui/views/style/platform_style_mac.mm
+++ b/ui/views/style/platform_style_mac.mm
@@ -6,6 +6,7 @@
#include "base/memory/ptr_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/color_utils.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/vector_icons.h"
#include "ui/resources/grit/ui_resources.h"
@@ -25,6 +26,7 @@ const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = false;
const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = false;
const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = true;
const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true;
+const bool PlatformStyle::kUseRipples = false;
const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction =
CustomButton::NOTIFY_ON_PRESS;
@@ -94,4 +96,14 @@ void PlatformStyle::ApplyLabelButtonTextStyle(
theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor);
}
+// static
+SkColor PlatformStyle::BackgroundColorForMdButton(
+ SkColor color,
+ Button::ButtonState state) {
+ // Per Harmony specs: Pressed state on Mac is + #000 at 0.05 alpha.
+ if (state == Button::STATE_PRESSED)
+ return color_utils::AlphaBlend(SK_ColorBLACK, color, 0x08);
+ return color;
+}
+
} // namespace views
« no previous file with comments | « ui/views/style/platform_style.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698