DolphinQt Settings: Signal Debug Font By Const Reference

This commit is contained in:
mitaclaw
2024-03-22 07:52:52 -07:00
parent 3948ac9513
commit ae5da02cde
8 changed files with 30 additions and 17 deletions

View File

@ -51,13 +51,9 @@ FIFOAnalyzer::FIFOAnalyzer(FifoPlayer& fifo_player) : m_fifo_player(fifo_player)
m_search_splitter->restoreState(
settings.value(QStringLiteral("fifoanalyzer/searchsplitter")).toByteArray());
m_detail_list->setFont(Settings::Instance().GetDebugFont());
m_entry_detail_browser->setFont(Settings::Instance().GetDebugFont());
connect(&Settings::Instance(), &Settings::DebugFontChanged, this, [this] {
m_detail_list->setFont(Settings::Instance().GetDebugFont());
m_entry_detail_browser->setFont(Settings::Instance().GetDebugFont());
});
OnDebugFontChanged(Settings::Instance().GetDebugFont());
connect(&Settings::Instance(), &Settings::DebugFontChanged, this,
&FIFOAnalyzer::OnDebugFontChanged);
}
FIFOAnalyzer::~FIFOAnalyzer()
@ -779,3 +775,9 @@ void FIFOAnalyzer::UpdateDescription()
object_size - entry_start, callback);
m_entry_detail_browser->setText(callback.text);
}
void FIFOAnalyzer::OnDebugFontChanged(const QFont& font)
{
m_detail_list->setFont(font);
m_entry_detail_browser->setFont(font);
}