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

Unified Diff: ui/native_theme/native_theme_base.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_base.cc
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
index 548b4a5cf695869c665d8eee425948b31e0d60af..ad80228c5d49aa4ca6894bdba57cb98fe78a69ae 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -115,10 +115,9 @@ gfx::Size NativeThemeBase::GetPartSize(Part part,
return gfx::Size(kCheckboxAndRadioWidth, kCheckboxAndRadioHeight);
case kScrollbarDownArrow:
case kScrollbarUpArrow:
- return gfx::Size(scrollbar_width_, scrollbar_button_length_);
case kScrollbarLeftArrow:
case kScrollbarRightArrow:
- return gfx::Size(scrollbar_button_length_, scrollbar_width_);
Evan Stade 2016/05/23 22:30:59 why not leave most stuff alone, but change scrollb
Bret 2016/05/23 22:53:15 That wasn't actually the problem. I thought this w
Bret 2016/05/23 23:44:06 Done.
+ return gfx::Size(); // No default size.
case kScrollbarHorizontalThumb:
// This matches Firefox on Linux.
return gfx::Size(2 * scrollbar_width_, scrollbar_width_);
@@ -221,7 +220,7 @@ void NativeThemeBase::Paint(SkCanvas* canvas,
case kScrollbarUpArrow:
case kScrollbarLeftArrow:
case kScrollbarRightArrow:
- if (scrollbar_button_length_ > 0)
+ if (HasScrollbarButtons())
esprehn 2016/05/23 23:11:19 how did we get here if it was zero size?
Bret 2016/05/23 23:44:06 It looks like ScrollbarThemeAura just calls paint
PaintArrowButton(canvas, rect, part, state);
break;
case kScrollbarHorizontalThumb:
@@ -265,10 +264,7 @@ void NativeThemeBase::Paint(SkCanvas* canvas,
canvas->restore();
}
-NativeThemeBase::NativeThemeBase()
- : scrollbar_width_(kDefaultScrollbarWidth),
- scrollbar_button_length_(kDefaultScrollbarButtonLength) {
-}
+NativeThemeBase::NativeThemeBase() : scrollbar_width_(kDefaultScrollbarWidth) {}
NativeThemeBase::~NativeThemeBase() {
}
« ui/native_theme/native_theme_aura.cc ('K') | « ui/native_theme/native_theme_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698