HelpWindow Size

.. just a minor nit to make the window a more
   appropriate size given the content.
This commit is contained in:
Mark Liversedge
2015-01-01 09:05:35 +00:00
parent 60ac85f9c0
commit d55d75cfcf

View File

@@ -35,18 +35,29 @@ HelpWindow::HelpWindow(Context *context) : context(context)
}
// prefer a tall slim label not a wide squat one
class TextPage : public QLabel
{
public:
TextPage(QWidget *parent) : QLabel(parent) {}
int heightForWidth(int w) const {
return w;
}
QSize sizeHint() const { return QSize(375,375); }
};
void
HelpWindow::fillPage() {
textPage = new QLabel(this);
textPage = new TextPage(this);
textPage->setContentsMargins(0,0,0,0);
textPage->setWordWrap(true);
textPage->setOpenExternalLinks(true);
textPage->setText(tr("<center>"
"<img src=\":images/gc.png\" height=80>"
"<h2>Help Options</h2>"
"<b><tt>\"Shift\"+\"F1\"</tt></b><br>provides a context specific short description of a feature"
" including the link to the Wiki page explaining more details<hr>"
"<h3>Additional documentation and tutorials are available here:</h3>"
"<br><a href=\"http://www.goldencheetah.org\">Golden Cheetah Website</a>"
"<br><a href=\"http://www.goldencheetah.org/#section-tutorials\">Golden Cheetah Website - Video Tutorials</a>"
"<br><a href=\"http://www.goldencheetah.org/#section-science\">Golden Cheetah Website - Science in Golden Cheetah</a>"
@@ -55,6 +66,4 @@ HelpWindow::fillPage() {
"<br><a href=\"https://github.com/GoldenCheetah/GoldenCheetah/wiki/FAQ\">Wiki - Frequently Asked Questions</a>"
));
}