mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 03:26:05 -04:00
Always return false on MainWindow eventFilter
This commit is contained in:
parent
2f364ebd89
commit
9639a3f777
@ -110,14 +110,12 @@ bool MainWindow::eventFilter(QObject* /*object*/, QEvent* event)
|
|||||||
const auto mouseEvent = static_cast<QMouseEvent*>(event);
|
const auto mouseEvent = static_cast<QMouseEvent*>(event);
|
||||||
const int tabRegion = getTabBar()->height() + getTopWidget()->height() + 30;
|
const int tabRegion = getTabBar()->height() + getTopWidget()->height() + 30;
|
||||||
int clickY = portutils::getY(*mouseEvent);
|
int clickY = portutils::getY(*mouseEvent);
|
||||||
|
|
||||||
// We don't have to check for visibilty as calling hide() on a hidden widget, or show() on a non-hidden widget is a no-op
|
// We don't have to check for visibilty as calling hide() on a hidden widget, or show() on a non-hidden widget is a no-op
|
||||||
if (clickY == 0) {
|
if (clickY == 0) {
|
||||||
showTabAndTop();
|
showTabAndTop();
|
||||||
} else if(clickY >= tabRegion) {
|
} else if(clickY >= tabRegion) {
|
||||||
hideTabAndTop();
|
hideTabAndTop();
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user