macOS: Dark mode: Fix a regression that caused the scrollbar to no longer be transient. Fixes #2088153 [[Regression] Scroll bars block information](https://bugs.launchpad.net/calibre/+bug/2088153)

This commit is contained in:
Kovid Goyal 2024-11-15 20:01:57 +05:30
parent e16a167f72
commit e854f0889d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -208,7 +208,9 @@ void CalibreStyle::drawComplexControl(ComplexControl control, const QStyleOption
return QProxyStyle::drawComplexControl(control, &opt, painter, widget); return QProxyStyle::drawComplexControl(control, &opt, painter, widget);
} }
break; /// }}} break; /// }}}
case CC_ScrollBar: {
case CC_ScrollBar: { // {{{
if (transient_scroller) break;
const QStyleOptionSlider *scroll_bar = qstyleoption_cast<const QStyleOptionSlider *>(option); const QStyleOptionSlider *scroll_bar = qstyleoption_cast<const QStyleOptionSlider *>(option);
if (scroll_bar && is_color_dark(option->palette.color(QPalette::Window))) { if (scroll_bar && is_color_dark(option->palette.color(QPalette::Window))) {
bool horizontal = scroll_bar->orientation == Qt::Horizontal; bool horizontal = scroll_bar->orientation == Qt::Horizontal;
@ -276,7 +278,8 @@ void CalibreStyle::drawComplexControl(ComplexControl control, const QStyleOption
} }
return; return;
}} break; }} break; // }}}
default: default:
break; break;
} }