Do bounds-checking on more windows (#4797)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-12-02 12:56:03 +01:00
committed by GitHub
parent e327ed4166
commit c4c94473ae
17 changed files with 120 additions and 38 deletions
+9 -3
View File
@@ -192,8 +192,12 @@ namespace {
void showTutorialVideo(QWidget *parent, const QString &source,
const QString &title, const QString &description)
{
auto window =
new BasePopup(BaseWindow::Flags::EnableCustomFrame, parent);
auto *window = new BasePopup(
{
BaseWindow::EnableCustomFrame,
BaseWindow::BoundsCheckOnShow,
},
parent);
window->setWindowTitle("Chatterino - " + title);
window->setAttribute(Qt::WA_DeleteOnClose);
auto layout = new QVBoxLayout();
@@ -1393,7 +1397,9 @@ void Split::showChatterList()
multiWidget->setLayout(dockVbox);
chatterDock->setWidget(multiWidget);
chatterDock->setFloating(true);
chatterDock->show();
widgets::showAndMoveWindowTo(
chatterDock, this->mapToGlobal(QPoint{0, this->header_->height()}),
widgets::BoundsChecking::CursorPosition);
chatterDock->activateWindow();
}