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

Unified Diff: ui/native_theme/native_theme_aura.cc

Issue 2006643004: Fix scrollbar buttons on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test 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/native_theme/native_theme_aura.cc
diff --git a/ui/native_theme/native_theme_aura.cc b/ui/native_theme/native_theme_aura.cc
index 74edcd558c8bb44cc6621c3f100e4a6b58e3f93a..cd5500a78601f0228a97ecd2b1fe41670b3c5fcd 100644
--- a/ui/native_theme/native_theme_aura.cc
+++ b/ui/native_theme/native_theme_aura.cc
@@ -80,12 +80,16 @@ NativeThemeAura* NativeThemeAura::instance() {
}
#endif
-NativeThemeAura::NativeThemeAura() {
- // We don't draw scrollbar buttons.
+bool NativeThemeAura::HasScrollbarButtons() const {
#if defined(OS_CHROMEOS)
- set_scrollbar_button_length(0);
+ // We don't draw scrollbar buttons.
+ return false;
+#else
+ return NativeTheme::HasScrollbarButtons();
#endif
+}
+NativeThemeAura::NativeThemeAura() {
// Images and alphas declarations assume the following order.
static_assert(kDisabled == 0, "states unexpectedly changed");
static_assert(kHovered == 1, "states unexpectedly changed");
@@ -216,8 +220,7 @@ void NativeThemeAura::PaintScrollbarThumbStateTransition(
// If there are no scrollbuttons then provide some padding so that the thumb
// doesn't touch the top of the track.
const int kThumbPadding = 2;
- const int extra_padding =
- (scrollbar_button_length() == 0) ? kThumbPadding : 0;
+ const int extra_padding = (HasScrollbarButtons()) ? 0 : kThumbPadding;
esprehn 2016/05/23 23:11:19 remove parens
Bret 2016/05/23 23:44:06 Done.
if (part == NativeTheme::kScrollbarVerticalThumb)
thumb_rect.Inset(kThumbPadding, extra_padding);
else

Powered by Google App Engine
This is Rietveld 408576698