From eb15897b1a7f7e05a3e125968365904eef069041 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Sat, 3 Jan 2026 23:44:09 +0200 Subject: [PATCH] reset scroll on resource change Signed-off-by: Trial97 --- launcher/ui/widgets/InfoFrame.cpp | 7 +++++++ launcher/ui/widgets/InfoFrame.h | 1 + 2 files changed, 8 insertions(+) diff --git a/launcher/ui/widgets/InfoFrame.cpp b/launcher/ui/widgets/InfoFrame.cpp index 4a71b6650..fcc5e817c 100644 --- a/launcher/ui/widgets/InfoFrame.cpp +++ b/launcher/ui/widgets/InfoFrame.cpp @@ -270,6 +270,7 @@ void InfoFrame::updateHiddenState() void InfoFrame::setName(QString text) { + resetScrolll(); if (text.isEmpty()) { ui->nameLabel->setHidden(true); } else { @@ -419,3 +420,9 @@ void InfoFrame::boxClosed([[maybe_unused]] int result) { m_current_box = nullptr; } + +void InfoFrame::resetScrolll() +{ + ui->scrollArea->horizontalScrollBar()->setValue(0); + ui->scrollArea->verticalScrollBar()->setValue(0); +} diff --git a/launcher/ui/widgets/InfoFrame.h b/launcher/ui/widgets/InfoFrame.h index 20c54e2e5..8d010c678 100644 --- a/launcher/ui/widgets/InfoFrame.h +++ b/launcher/ui/widgets/InfoFrame.h @@ -76,6 +76,7 @@ class InfoFrame : public QFrame { private: void updateHiddenState(); + void resetScrolll(); private: Ui::InfoFrame* ui;