Added logic to better size the comment area of Qt palette config window.

This commit is contained in:
mjbudd77 2021-06-17 20:44:26 -04:00
parent 39a50e46f4
commit 9f85d445c5
1 changed files with 5 additions and 1 deletions

View File

@ -67,7 +67,7 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
style = this->style();
resize(512, 600);
resize(512, 512);
// sync with config
g_config->getOption("SDL.Hue", &hue);
@ -268,6 +268,10 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
comments->moveCursor(QTextCursor::Start);
comments->setReadOnly(true);
QFont font = comments->currentFont();
QFontMetrics metrics(font);
comments->setMinimumHeight( 7 * metrics.lineSpacing() );
mainLayout->addWidget(comments);
closeButton = new QPushButton( tr("Close") );