Commit 7c81071f authored by Tom on the web's avatar Tom on the web 🚴🏿 Committed by Albert Astals Cid
Browse files

Set minimum size

parent ce593c75
Pipeline #85660 passed with stage
in 30 seconds
...@@ -66,7 +66,6 @@ MainWindow::MainWindow(QWidget* parent) ...@@ -66,7 +66,6 @@ MainWindow::MainWindow(QWidget* parent)
m_aiFactory(0), m_animate(true), m_aiFactory(0), m_animate(true),
m_winsLabel (new QLabel(i18n("Wins: %1", m_wins))), m_winsLabel (new QLabel(i18n("Wins: %1", m_wins))),
m_lossesLabel (new QLabel(i18n("Losses: %1", m_losses))) { m_lossesLabel (new QLabel(i18n("Losses: %1", m_losses))) {
statusBar()->showMessage(QStringLiteral(" "));
statusBar()->insertPermanentWidget(0, m_winsLabel); statusBar()->insertPermanentWidget(0, m_winsLabel);
statusBar()->insertPermanentWidget(1, m_lossesLabel); statusBar()->insertPermanentWidget(1, m_lossesLabel);
...@@ -91,6 +90,10 @@ MainWindow::MainWindow(QWidget* parent) ...@@ -91,6 +90,10 @@ MainWindow::MainWindow(QWidget* parent)
setCentralWidget(m_view); setCentralWidget(m_view);
m_view->show(); m_view->show();
setupGUI(); setupGUI();
QFontMetrics fm(font());
auto base = fm.boundingRect(QLatin1Char('x'));
setMinimumSize(base.width() * 45, base.height() * 55);
} }
MainWindow::~MainWindow() { MainWindow::~MainWindow() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment