mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 20:13:24 -08:00
[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:
parent
f154335f5c
commit
f8c3f460d6
1 changed files with 6 additions and 0 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include <QScrollBar>
|
||||
#include <QSettings>
|
||||
#include <QSharedPointer>
|
||||
#include <QSizePolicy>
|
||||
#include <QTextEdit>
|
||||
#include <QTextStream>
|
||||
#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
|
||||
// to the controls around it.
|
||||
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->setWordWrap(true);
|
||||
statusLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
statusLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
|
||||
|
||||
progressLabel = new QLabel(this);
|
||||
progressBar = new QProgressBar(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue