[Oracle] Stop the parent-tag explainer from being clipped

A word-wrapped QLabel reports a one-line sizeHint, so the wizard page reserved too little height and the explanation lost its top and bottom lines. Pin the vertical size policy to Minimum on the explainer and on the status label, so the wrapped height becomes part of the page minimum. Verified with a layout probe: the label went from 28 px tall (needed 56) to its full height.
This commit is contained in:
Lukas Brübach 2026-11-08 20:44:10 +01:00
parent f154335f5c
commit f8c3f460d6

View file

@ -39,6 +39,7 @@
#include <QScrollBar> #include <QScrollBar>
#include <QSettings> #include <QSettings>
#include <QSharedPointer> #include <QSharedPointer>
#include <QSizePolicy>
#include <QTextEdit> #include <QTextEdit>
#include <QTextStream> #include <QTextStream>
#include <QTimer> #include <QTimer>
@ -770,10 +771,15 @@ TagsPage::TagsPage(QWidget *parent) : OracleWizardPage(parent)
// so it reads as an explanation of the option rather than a caption glued // so it reads as an explanation of the option rather than a caption glued
// to the controls around it. // to the controls around it.
parentsExplainer->setContentsMargins(24, 4, 0, 10); parentsExplainer->setContentsMargins(24, 4, 0, 10);
// A word-wrapped label reports a one-line sizeHint, so a short page squeezes
// it and clips the text top and bottom. Pinning the vertical policy makes
// the wrapped height part of the page's minimum size.
parentsExplainer->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
statusLabel = new QLabel(this); statusLabel = new QLabel(this);
statusLabel->setWordWrap(true); statusLabel->setWordWrap(true);
statusLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); statusLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
statusLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
progressLabel = new QLabel(this); progressLabel = new QLabel(this);
progressBar = new QProgressBar(this); progressBar = new QProgressBar(this);