Skip to content
Snippets Groups Projects
Commit 95409c68 authored by lat9nq's avatar lat9nq
Browse files

configure_ui: Update the screenshots data

parent 227950ac
No related branches found
No related tags found
No related merge requests found
...@@ -166,7 +166,7 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent) ...@@ -166,7 +166,7 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
} }
}); });
const auto update_height_text = [this]() { const auto update_width_text = [this]() {
const auto index = ui->screenshot_aspect_ratio->currentIndex(); const auto index = ui->screenshot_aspect_ratio->currentIndex();
const Settings::AspectRatio ratio = UISettings::ConvertScreenshotRatioToRatio( const Settings::AspectRatio ratio = UISettings::ConvertScreenshotRatioToRatio(
screenshot_aspect_ratio_translations[index].first); screenshot_aspect_ratio_translations[index].first);
...@@ -180,10 +180,10 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent) ...@@ -180,10 +180,10 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
}; };
connect(ui->screenshot_aspect_ratio, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(ui->screenshot_aspect_ratio, QOverload<int>::of(&QComboBox::currentIndexChanged),
update_height_text); update_width_text);
connect(ui->screenshot_height, &QComboBox::currentTextChanged, update_height_text); connect(ui->screenshot_height, &QComboBox::currentTextChanged, update_width_text);
update_height_text(); update_width_text();
} }
ConfigureUi::~ConfigureUi() = default; ConfigureUi::~ConfigureUi() = default;
...@@ -236,6 +236,15 @@ void ConfigureUi::SetConfiguration() { ...@@ -236,6 +236,15 @@ void ConfigureUi::SetConfiguration() {
UISettings::values.enable_screenshot_save_as.GetValue()); UISettings::values.enable_screenshot_save_as.GetValue());
ui->screenshot_path_edit->setText(QString::fromStdString( ui->screenshot_path_edit->setText(QString::fromStdString(
Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir))); Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir)));
for (u32 i = 0; i < screenshot_aspect_ratio_translations.size(); i++) {
const auto ratio = screenshot_aspect_ratio_translations[i].first;
if (ratio == UISettings::values.screenshot_aspect_ratio.GetValue()) {
ui->screenshot_aspect_ratio->setCurrentIndex(i);
}
}
ui->screenshot_height->setCurrentText(
QString::fromStdString(fmt::format("{}", UISettings::values.screenshot_height.GetValue())));
} }
void ConfigureUi::changeEvent(QEvent* event) { void ConfigureUi::changeEvent(QEvent* event) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment