mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Fix the minimum size of help text windows to the content size
This could make help text windows bigger than the screen, if we want to go there then using a QLabel sub-class will need to change, probably by using a read-only QTextEdit instead as that provides scroll bars. Maybe consider a multi-column table for the contents as an alternative to scroll bars.
This commit is contained in:
parent
c97a127c68
commit
c9977e2a9c
@ -22,10 +22,11 @@ HelpTextWindow::HelpTextWindow (QString const& title, QString const& file_name,
|
|||||||
, tr ("Error: %1").arg (source.errorString ()));
|
, tr ("Error: %1").arg (source.errorString ()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setText (QTextStream {&source}.readAll ());
|
|
||||||
setWindowTitle(QApplication::applicationName () + " - " + title);
|
setWindowTitle(QApplication::applicationName () + " - " + title);
|
||||||
setMargin (10);
|
setMargin (10);
|
||||||
setBackgroundRole (QPalette::Base);
|
setBackgroundRole (QPalette::Base);
|
||||||
setAutoFillBackground (true);
|
setAutoFillBackground (true);
|
||||||
setStyleSheet (font_as_stylesheet (font));
|
setStyleSheet (font_as_stylesheet (font));
|
||||||
|
setText (QTextStream {&source}.readAll ());
|
||||||
|
setMinimumSize (sizeHint ());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user