Remove some comments.

This commit is contained in:
Lukas Brübach 2025-01-24 11:30:39 +01:00
parent 402d2f8776
commit 464db5e697

View file

@ -85,15 +85,6 @@ FlowWidget::FlowWidget(QWidget *parent,
*/
void FlowWidget::addWidget(QWidget *widget_to_add) const
{
// Adjust size policy if scrollbars are disabled
// if (scrollArea->horizontalScrollBarPolicy() == Qt::ScrollBarAlwaysOff) {
// widget_to_add->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
//}
// if (scrollArea->verticalScrollBarPolicy() == Qt::ScrollBarAlwaysOff) {
// widget_to_add->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
//}
// Add the widget to the flow layout
flowLayout->addWidget(widget_to_add);
}
@ -132,8 +123,6 @@ void FlowWidget::resizeEvent(QResizeEvent *event)
{
QWidget::resizeEvent(event);
qCDebug(FlowWidgetSizeLog) << event->size();
// Trigger the layout to recalculate
if (flowLayout != nullptr) {
flowLayout->invalidate(); // Marks the layout as dirty and requires recalculation
@ -142,10 +131,8 @@ void FlowWidget::resizeEvent(QResizeEvent *event)
// Ensure the scroll area and its content adjust correctly
if (scrollArea != nullptr && scrollArea->widget() != nullptr) {
qCDebug(FlowWidgetSizeLog) << "Got a scrollarea: " << scrollArea->widget()->size();
scrollArea->widget()->adjustSize();
} else {
qCDebug(FlowWidgetSizeLog) << "Rawdogging the container, daddy: " << container->size();
container->adjustSize();
}
}