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

Unified Diff: ui/views/controls/combobox/combobox.cc

Issue 2826313006: views: remove PlatformStyle combobox hooks (Closed)
Patch Set: remove BUILD lines for deleted icons Created 3 years, 8 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/controls/combobox/combobox.h ('k') | ui/views/style/platform_style.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 24c51702b2d11798c62274c4add4f29ea5629a8b..99d025354e69f1a1c3570c0d08e74473594202b0 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -452,7 +452,8 @@ Combobox::Combobox(ui::ComboboxModel* model, Style style)
SetPaintToLayer();
layer()->SetFillsBoundsOpaquely(false);
} else {
- arrow_image_ = PlatformStyle::CreateComboboxArrow(enabled(), style);
+ arrow_image_ = *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ IDR_MENU_DROPARROW);
}
}
@@ -550,12 +551,6 @@ void Combobox::Layout() {
arrow_button_->SetBounds(arrow_button_x, 0, arrow_button_width, height());
}
-void Combobox::OnEnabledChanged() {
- View::OnEnabledChanged();
- if (!UseMd())
- arrow_image_ = PlatformStyle::CreateComboboxArrow(enabled(), style_);
-}
-
void Combobox::OnNativeThemeChanged(const ui::NativeTheme* theme) {
if (!UseMd())
return;
@@ -1013,9 +1008,9 @@ PrefixSelector* Combobox::GetPrefixSelector() {
}
int Combobox::GetArrowContainerWidth() const {
- const int kMdPaddingWidth = 8;
- int arrow_pad = UseMd() ? kMdPaddingWidth
- : PlatformStyle::kComboboxNormalArrowPadding;
+ constexpr int kMdPaddingWidth = 8;
+ constexpr int kNormalPaddingWidth = 7;
+ int arrow_pad = UseMd() ? kMdPaddingWidth : kNormalPaddingWidth;
int padding = style_ == STYLE_NORMAL
? arrow_pad * 2
: kActionLeftPadding + kActionRightPadding;
« no previous file with comments | « ui/views/controls/combobox/combobox.h ('k') | ui/views/style/platform_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698