mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 05:20:00 -08:00
Update card_database_visual_view.cpp
This commit is contained in:
parent
d82143ba52
commit
153775198f
1 changed files with 3 additions and 5 deletions
|
|
@ -130,11 +130,9 @@ void CardDatabaseVisualView::wheelEvent(QWheelEvent *event)
|
|||
return;
|
||||
}
|
||||
|
||||
// Whether the scroll bar is shown says nothing about whether the grid can
|
||||
// scroll: macOS uses transient (overlay) scroll bars that hide themselves
|
||||
// once they fade out, and Qt hides the widget for good when that happens.
|
||||
// The range is the real answer; ignoring the wheel when there is nothing to
|
||||
// scroll still lets an enclosing scroll area take over.
|
||||
// macOS uses transient (overlay) scroll bars that hide themselves
|
||||
// once they fade out, so we need to use the range to determine if we ignore the wheel when there is nothing to
|
||||
// scroll. This lets an enclosing scroll area take over.
|
||||
QScrollBar *bar = verticalScrollBar();
|
||||
if (bar->maximum() <= bar->minimum()) {
|
||||
event->ignore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue