DolphinQt/OnScreenDisplayPane: Rename "Graph Update Rate" back to "Performance Sample Window" and don't disable it based on "Show Performance Graphs".

This commit is contained in:
Jordan Woyak 2025-11-21 01:32:48 -06:00
parent 4f30aaf1ca
commit 8efc4086f0
2 changed files with 7 additions and 16 deletions

View File

@ -48,9 +48,9 @@ void OnScreenDisplayPane::CreateLayout()
m_show_speed = new ConfigBool(tr("Show % Speed"), Config::GFX_SHOW_SPEED);
m_speed_colors = new ConfigBool(tr("Show Speed Colors"), Config::GFX_SHOW_SPEED_COLORS);
m_show_graph = new ConfigBool(tr("Show Performance Graphs"), Config::GFX_SHOW_GRAPHS);
m_graph_update_label = new QLabel(tr("Graph Update Rate (ms):"));
m_graph_update_rate = new ConfigInteger(0, 10000, Config::GFX_PERF_SAMP_WINDOW, 100);
m_graph_update_rate->SetTitle(tr("Performance Sample Window (ms)"));
auto* const perf_sample_window_label = new QLabel(tr("Performance Sample Window (ms)"));
m_perf_sample_window = new ConfigInteger(0, 10000, Config::GFX_PERF_SAMP_WINDOW, 100);
m_perf_sample_window->SetTitle(perf_sample_window_label->text());
performance_layout->addWidget(m_show_fps, 0, 0);
performance_layout->addWidget(m_show_ftimes, 0, 1);
@ -59,8 +59,8 @@ void OnScreenDisplayPane::CreateLayout()
performance_layout->addWidget(m_show_speed, 2, 0);
performance_layout->addWidget(m_speed_colors, 2, 1);
performance_layout->addWidget(m_show_graph, 3, 0);
performance_layout->addWidget(m_graph_update_label, 4, 0);
performance_layout->addWidget(m_graph_update_rate, 4, 1);
performance_layout->addWidget(perf_sample_window_label, 4, 0);
performance_layout->addWidget(m_perf_sample_window, 4, 1);
// Movie
auto* movie_box = new QGroupBox(tr("Movie Window"));
@ -118,14 +118,6 @@ void OnScreenDisplayPane::CreateLayout()
void OnScreenDisplayPane::ConnectLayout()
{
// Disable graph options when graph is not visible.
m_graph_update_rate->setEnabled(m_show_graph->isChecked());
m_graph_update_label->setEnabled(m_show_graph->isChecked());
connect(m_show_graph, &QCheckBox::toggled, this, [this](bool checked) {
m_graph_update_rate->setEnabled(checked);
m_graph_update_label->setEnabled(checked);
});
// Disable movie window options when window is closed.
auto enable_movie_items = [this](bool checked) {
for (auto* widget :
@ -235,7 +227,7 @@ void OnScreenDisplayPane::AddDescriptions()
m_show_vtimes->SetDescription(tr(TR_SHOW_VTIMES_DESCRIPTION));
m_show_graph->SetDescription(tr(TR_SHOW_GRAPHS_DESCRIPTION));
m_show_speed->SetDescription(tr(TR_SHOW_SPEED_DESCRIPTION));
m_graph_update_rate->SetDescription(tr(TR_PERF_SAMP_WINDOW_DESCRIPTION));
m_perf_sample_window->SetDescription(tr(TR_PERF_SAMP_WINDOW_DESCRIPTION));
m_speed_colors->SetDescription(tr(TR_SHOW_SPEED_COLORS_DESCRIPTION));
m_show_ping->SetDescription(tr(TR_SHOW_NETPLAY_PING_DESCRIPTION));

View File

@ -31,8 +31,7 @@ private:
ConfigBool* m_show_graph;
ConfigBool* m_show_speed;
ConfigBool* m_speed_colors;
QLabel* m_graph_update_label;
ConfigInteger* m_graph_update_rate;
ConfigInteger* m_perf_sample_window;
// Movie window
ConfigBool* m_movie_window;