From 774f68936d0cf6921bc38b90d71c16bcfa958aed Mon Sep 17 00:00:00 2001 From: KamFretoZ <14798312+kamfretoz@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:56:12 +0700 Subject: [PATCH] Qt: Cleanup Internal label names --- pcsx2-qt/Settings/GraphicsSettingsWidget.cpp | 36 +++--- pcsx2-qt/Settings/GraphicsSettingsWidget.ui | 125 ++++++++++--------- 2 files changed, 82 insertions(+), 79 deletions(-) diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index 6884c2d393..4661345b69 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -73,7 +73,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* ////////////////////////////////////////////////////////////////////////// // Global Settings ////////////////////////////////////////////////////////////////////////// - SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.adapter, "EmuCore/GS", "Adapter"); + SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.adapterDropdown, "EmuCore/GS", "Adapter"); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableHWFixes, "EmuCore/GS", "UserHacks", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.spinGPUDuringReadbacks, "EmuCore/GS", "HWSpinGPUForReadbacks", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.spinCPUDuringReadbacks, "EmuCore/GS", "HWSpinCPUForReadbacks", false); @@ -263,9 +263,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* const int renderer = m_dialog->getEffectiveIntValue("EmuCore/GS", "Renderer", static_cast(GSRendererType::Auto)); for (const RendererInfo& ri : s_renderer_info) { - m_ui.renderer->addItem(qApp->translate("GraphicsSettingsWidget", ri.name)); + m_ui.rendererDropdown->addItem(qApp->translate("GraphicsSettingsWidget", ri.name)); if (renderer == static_cast(ri.type)) - m_ui.renderer->setCurrentIndex(m_ui.renderer->count() - 1); + m_ui.rendererDropdown->setCurrentIndex(m_ui.rendererDropdown->count() - 1); } // per-game override for renderer is slightly annoying, since we need to populate the global setting field @@ -278,15 +278,15 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* if (global_renderer == static_cast(ri.type)) global_renderer_name = qApp->translate("GraphicsSettingsWidget", ri.name); } - m_ui.renderer->insertItem(0, tr("Use Global Setting [%1]").arg(global_renderer_name)); + m_ui.rendererDropdown->insertItem(0, tr("Use Global Setting [%1]").arg(global_renderer_name)); // Effective Index already selected, set to global if setting is not per-game int override_renderer; if (!sif->GetIntValue("EmuCore/GS", "Renderer", &override_renderer)) - m_ui.renderer->setCurrentIndex(0); + m_ui.rendererDropdown->setCurrentIndex(0); } - connect(m_ui.renderer, QOverload::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onRendererChanged); + connect(m_ui.rendererDropdown, QOverload::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onRendererChanged); connect(m_ui.enableHWFixes, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions); connect(m_ui.textureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onTextureFilteringChange); connect(m_ui.swTextureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onSWTextureFilteringChange); @@ -327,8 +327,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* m_dialog->removeSettingValue("EmuCore", "EnableNoInterlacingPatches"); } - m_ui.gridLayout->removeWidget(m_ui.widescreenPatches); - m_ui.gridLayout->removeWidget(m_ui.noInterlacingPatches); + m_ui.displayGridLayout->removeWidget(m_ui.widescreenPatches); + m_ui.displayGridLayout->removeWidget(m_ui.noInterlacingPatches); safe_delete(m_ui.widescreenPatches); safe_delete(m_ui.noInterlacingPatches); } @@ -838,7 +838,7 @@ void GraphicsSettingsWidget::onAdapterChanged(int index) const int first_adapter = m_dialog->isPerGameSettings() ? 2 : 1; if (index >= first_adapter) - m_dialog->setStringSettingValue("EmuCore/GS", "Adapter", m_ui.adapter->currentText().toUtf8().constData()); + m_dialog->setStringSettingValue("EmuCore/GS", "Adapter", m_ui.adapterDropdown->currentText().toUtf8().constData()); else if (index > 0 && m_dialog->isPerGameSettings()) m_dialog->setStringSettingValue("EmuCore/GS", "Adapter", ""); else @@ -1042,31 +1042,31 @@ void GraphicsSettingsWidget::updateRendererDependentOptions() // fill+select adapters { - QSignalBlocker sb(m_ui.adapter); + QSignalBlocker sb(m_ui.adapterDropdown); std::string current_adapter = Host::GetBaseStringSettingValue("EmuCore/GS", "Adapter", ""); - m_ui.adapter->clear(); - m_ui.adapter->setEnabled(!adapters.empty()); - m_ui.adapter->addItem(tr("(Default)")); - m_ui.adapter->setCurrentIndex(0); + m_ui.adapterDropdown->clear(); + m_ui.adapterDropdown->setEnabled(!adapters.empty()); + m_ui.adapterDropdown->addItem(tr("(Default)")); + m_ui.adapterDropdown->setCurrentIndex(0); if (m_dialog->isPerGameSettings()) { - m_ui.adapter->insertItem( + m_ui.adapterDropdown->insertItem( 0, tr("Use Global Setting [%1]").arg(current_adapter.empty() ? tr("(Default)") : QString::fromStdString(current_adapter))); if (!m_dialog->getSettingsInterface()->GetStringValue("EmuCore/GS", "Adapter", ¤t_adapter)) { // clear the adapter so we don't set it to the global value current_adapter.clear(); - m_ui.adapter->setCurrentIndex(0); + m_ui.adapterDropdown->setCurrentIndex(0); } } for (const std::string& adapter : adapters) { - m_ui.adapter->addItem(QString::fromStdString(adapter)); + m_ui.adapterDropdown->addItem(QString::fromStdString(adapter)); if (current_adapter == adapter) - m_ui.adapter->setCurrentIndex(m_ui.adapter->count() - 1); + m_ui.adapterDropdown->setCurrentIndex(m_ui.adapterDropdown->count() - 1); } } diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index aa8b84d066..9fb87bd503 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -24,30 +24,30 @@ 0 - + - + Renderer: - + - + Adapter: - + @@ -66,7 +66,7 @@ - + Fullscreen Mode: @@ -76,7 +76,7 @@ - + Aspect Ratio: @@ -107,7 +107,7 @@ - + FMV Aspect Ratio: @@ -138,7 +138,7 @@ - + Deinterlacing: @@ -199,7 +199,7 @@ - + Bilinear Filtering: @@ -225,14 +225,14 @@ - + Screenshot Size: - + @@ -272,7 +272,7 @@ - + Quality: @@ -294,7 +294,7 @@ - + Vertical Stretch: @@ -314,16 +314,16 @@ - + Crop: - + - + Left: @@ -340,7 +340,7 @@ - + Top: @@ -357,7 +357,7 @@ - + Right: @@ -374,7 +374,7 @@ - + Bottom: @@ -456,7 +456,7 @@ - + Internal Resolution: @@ -466,7 +466,7 @@ - + Texture Filtering: @@ -497,7 +497,7 @@ - + Trilinear Filtering: @@ -528,7 +528,7 @@ - + Anisotropic Filtering: @@ -538,7 +538,7 @@ - + Dithering: @@ -569,7 +569,7 @@ - + Blending Accuracy: @@ -610,7 +610,7 @@ - + Texture Preloading: @@ -675,7 +675,7 @@ - + Texture Filtering: @@ -718,7 +718,7 @@ - + Software Rendering Threads: @@ -757,14 +757,14 @@ - + CPU Sprite Render Size: - + @@ -846,7 +846,7 @@ - + Software CLUT Render: @@ -878,7 +878,7 @@ - + GPU Target CLUT: @@ -904,7 +904,7 @@ - + Auto Flush: @@ -930,7 +930,7 @@ - + Texture Inside RT: @@ -956,14 +956,14 @@ - + Skip Draw Range: - + @@ -981,7 +981,7 @@ - + @@ -1055,7 +1055,7 @@ - + Half Pixel Offset: @@ -1091,7 +1091,7 @@ - + Round Sprite: @@ -1156,7 +1156,7 @@ - + @@ -1188,7 +1188,7 @@ - + Bilinear Dirty Upscale: @@ -1338,7 +1338,7 @@ - + Contrast Adaptive Sharpening: @@ -1368,7 +1368,7 @@ - + Sharpness: @@ -1408,7 +1408,7 @@ - + TV Shader: @@ -1481,7 +1481,7 @@ - + Brightness: @@ -1498,7 +1498,7 @@ - + Contrast: @@ -1515,7 +1515,7 @@ - + Saturation: @@ -1563,7 +1563,7 @@ - + OSD Scale: @@ -1692,13 +1692,16 @@ Recording - + - + + + capture + Capture Setup - + @@ -1710,7 +1713,7 @@ - + 20 @@ -1859,7 +1862,7 @@ - + x @@ -1920,7 +1923,7 @@ Video Dumping Directory - + @@ -1971,7 +1974,7 @@ Advanced - + @@ -1979,7 +1982,7 @@ - + Hardware Download Mode: @@ -2010,7 +2013,7 @@ - + GS Dump Compression: @@ -2061,7 +2064,7 @@ - + Allow Exclusive Fullscreen: @@ -2096,7 +2099,7 @@ - + Override Texture Barriers: @@ -2122,7 +2125,7 @@ - +