Skip to content

Commit

Permalink
Merge pull request #6557 from spycrab/qt_log_font
Browse files Browse the repository at this point in the history
Qt/LogWidget: Add "Debugger Font" option
  • Loading branch information
leoetlino committed Mar 29, 2018
2 parents c697b7d + 8cb497c commit e4f2ff0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/Core/DolphinQt2/Config/LogWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ LogWidget::LogWidget(QWidget* parent) : QDockWidget(parent), m_timer(new QTimer(
connect(m_timer, &QTimer::timeout, this, &LogWidget::UpdateLog);
m_timer->start(UPDATE_LOG_DELAY);

connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &LogWidget::UpdateFont);

LogManager::GetInstance()->RegisterListener(LogListener::LOG_WINDOW_LISTENER, this);
}

Expand Down Expand Up @@ -97,6 +99,9 @@ void LogWidget::UpdateFont()
f = QFont(QStringLiteral("Monospace"));
f.setStyleHint(QFont::TypeWriter);
break;
case 2: // Debugger font
f = Settings::Instance().GetDebugFont();
break;
}
m_log_text->setFont(f);
}
Expand All @@ -110,7 +115,7 @@ void LogWidget::CreateWidgets()
m_log_font = new QComboBox;
m_log_clear = new QPushButton(tr("Clear"));

m_log_font->addItems({tr("Default Font"), tr("Monospaced Font")});
m_log_font->addItems({tr("Default Font"), tr("Monospaced Font"), tr("Selected Font")});

auto* log_layout = new QGridLayout;
m_tab_log->setLayout(log_layout);
Expand Down

0 comments on commit e4f2ff0

Please sign in to comment.