Bug 1475033 part 6 - Have scrollbar auto colors resolve to the corresponding colors on Windows 10. r?jimm
So that we can use custom scrollbar for thin scrollbar.
MozReview-Commit-ID: FCHzV5MJbx
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -1960,29 +1960,23 @@ RENDER_AGAIN:
nativeDrawing.PaintToContext();
return NS_OK;
}
static nscolor
GetScrollbarFaceColorForAuto(ComputedStyle* aStyle)
{
- // Do we want to derive from scrollbar-track-color when possible?
- DWORD sysColor = ::GetSysColor(COLOR_SCROLLBAR);
- return NS_RGB(GetRValue(sysColor),
- GetGValue(sysColor),
- GetBValue(sysColor));
+ return NS_RGB(205, 205, 205);
}
static nscolor
GetScrollbarTrackColorForAuto(ComputedStyle* aStyle)
{
- // Fallback to background color for now. Do we want to derive from
- // scrollbar-face-color somehow?
- return aStyle->StyleBackground()->BackgroundColor(aStyle);
+ return NS_RGB(240, 240, 240);
}
nscolor
nsNativeThemeWin::GetWidgetAutoColor(ComputedStyle* aStyle, WidgetType aWidgetType)
{
switch (aWidgetType) {
case StyleAppearance::Scrollbar:
case StyleAppearance::ScrollbarSmall: