Add console font size setting and a preview\

Also moves the console settings from the minecraft page.
This commit is contained in:
Petr Mrázek
2014-11-11 00:50:17 +01:00
parent 5711b1be95
commit 41bd2a6634
7 changed files with 201 additions and 65 deletions

View File

@ -21,7 +21,13 @@ LogPage::LogPage(MinecraftProcess *proc, QWidget *parent)
// create the format and set its font
defaultFormat = new QTextCharFormat(ui->text->currentCharFormat());
QString fontFamily = MMC->settings()->get("ConsoleFont").toString();
defaultFormat->setFont(QFont(fontFamily));
bool conversionOk = false;
int fontSize = MMC->settings()->get("ConsoleFontSize").toInt(&conversionOk);
if(!conversionOk)
{
fontSize = 11;
}
defaultFormat->setFont(QFont(fontFamily, fontSize));
auto findShortcut = new QShortcut(QKeySequence(QKeySequence::Find), this);
connect(findShortcut, SIGNAL(activated()), SLOT(findActivated()));