Manager: Use monospace font for displaying the config

Also make the config window resizable
This commit is contained in:
Alexander Babikov
2025-07-29 05:41:23 +05:00
parent 2657a5bade
commit 8c88d6257b
2 changed files with 23 additions and 1 deletions

View File

@@ -139,6 +139,17 @@ WithExistingConfigPage(QWidget *parent)
topLabel->setWordWrap(true);
existingConfiguration = new QPlainTextEdit();
const auto monospaceFont = new QFont();
#ifdef Q_OS_WINDOWS
monospaceFont->setFamily("Consolas");
#elif defined(Q_OS_MACOS)
monospaceFont->setFamily("Menlo");
#else
monospaceFont->setFamily("Monospace");
#endif
monospaceFont->setStyleHint(QFont::Monospace);
monospaceFont->setFixedPitch(true);
existingConfiguration->setFont(*monospaceFont);
connect(existingConfiguration, &QPlainTextEdit::textChanged, this, &WithExistingConfigPage::completeChanged);
registerField("existingConfiguration*", this, "configuration");