mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(groups): Avoid segfault when resizing group audio window
Avatars for group members currently in a call are resized depending on the area they are displayed in. Previously a scrollbar would appear and disapear based on the size of the contents. This resulted in oscillations that ended in a SIGSEGV. This fix avoids the oscillations by fixing the scrollbar to always be shown
This commit is contained in:
parent
08436bc2f1
commit
d4d4308e28
|
@ -128,6 +128,11 @@ GroupNetCamView::GroupNetCamView(int group, QWidget* parent)
|
|||
|
||||
QScrollArea* scrollArea = new QScrollArea();
|
||||
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
// Note this is needed to prevent oscillations that result in segfaults
|
||||
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
scrollArea->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
|
||||
|
||||
scrollArea->setFrameStyle(QFrame::NoFrame);
|
||||
QWidget* widget = new QWidget(nullptr);
|
||||
scrollArea->setWidgetResizable(true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user