From 238f9add49466d3f9a80294e0934a8e16f3cde61 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 28 Aug 2022 13:05:28 +0200 Subject: [PATCH] gui: Set a more reasonable maximum width for previews They won't be this large but in particular for vertical scroll, this makes way more sense. --- gui/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 619634e..6a3402e 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "mainwindow.h" #include "ui_mainwindow.h" #include "clicklabel.h" @@ -647,6 +648,7 @@ void MainWindow::previewReceived(QSharedPointer preview, unsigned headerLabel->setText(QString("Path: ") + preview->getDocumentPath()); ClickLabel *label = dynamic_cast(preview->createPreviewWidget()); + label->setMaximumWidth(QApplication::desktop()->availableGeometry().width() - 200); QVBoxLayout *previewLayout = new QVBoxLayout();