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

Unified Diff: ui/views/style/platform_style.cc

Issue 1904753002: MenuButton: support Mac look & feel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add basic tests Created 4 years, 7 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
Index: ui/views/style/platform_style.cc
diff --git a/ui/views/style/platform_style.cc b/ui/views/style/platform_style.cc
index a303d84cd760ce78040ed17287e711afcce4fa6e..cf30231649b19eaa7ddffb1a9847722ae6ab8ac7 100644
--- a/ui/views/style/platform_style.cc
+++ b/ui/views/style/platform_style.cc
@@ -52,11 +52,23 @@ std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() {
}
// static
-std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground() {
+std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground(
+ int shoulder_width) {
return nullptr;
}
// static
+std::unique_ptr<Background> PlatformStyle::CreateMenuButtonBackground(
+ int shoulder_width) {
+ return nullptr;
+}
+
+// static
+std::unique_ptr<FocusableBorder> PlatformStyle::CreateMenuButtonBorder() {
+ return base::WrapUnique(new FocusableBorder());
+}
+
+// static
std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
Button::ButtonStyle style) {
if (!ui::MaterialDesignController::IsModeMaterial() ||
@@ -71,6 +83,12 @@ std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
}
// static
+gfx::ImageSkia PlatformStyle::CreateMenuButtonArrow(bool is_enabled) {
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW);
+}
+
+// static
std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
return base::WrapUnique(new NativeScrollBar(is_horizontal));
}

Powered by Google App Engine
This is Rietveld 408576698