mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1615028 - Make nsNativeBasicTheme honor custom scrollbar styles. r=spohl
By falling back to the generic code like nsNativeThemeGTK does. We may want to be more nuanced in other platforms? I don't know. This is very noticeable on Riot and other apps that override the scrollbar width / scrollbar colors. Differential Revision: https://phabricator.services.mozilla.com/D62634 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
97684579f8
commit
4fb3a8f1ae
@ -811,6 +811,16 @@ bool nsNativeBasicTheme::ThemeSupportsWidget(nsPresContext* aPresContext,
|
||||
aAppearance = StyleAppearance::Menulist;
|
||||
}
|
||||
|
||||
if (IsWidgetScrollbarPart(aAppearance)) {
|
||||
const auto* style = nsLayoutUtils::StyleForScrollbar(aFrame);
|
||||
// We don't currently handle custom scrollbars on nsNativeBasicTheme. We
|
||||
// could, potentially.
|
||||
if (style->StyleUI()->HasCustomScrollbars() ||
|
||||
style->StyleUIReset()->mScrollbarWidth == StyleScrollbarWidth::Thin) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Radio:
|
||||
case StyleAppearance::Checkbox:
|
||||
|
Loading…
Reference in New Issue
Block a user