Skip to content

Commit

Permalink
Hide lossless warning on "Size" mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymphatus committed Aug 6, 2023
1 parent 53e393b commit 196bef6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,11 +1356,16 @@ void MainWindow::onMaxOutputSizeUnitChanged(int value)

void MainWindow::toggleLosslessWarningVisible()
{
bool showLosslessWarning = ui->lossless_CheckBox->isChecked() && (ui->format_ComboBox->currentIndex() != 0 || ui->fitTo_ComboBox->currentIndex() != ResizeMode::NO_RESIZE);
bool showLosslessWarning = ui->lossless_CheckBox->isChecked()
&& (ui->format_ComboBox->currentIndex() != 0 || ui->fitTo_ComboBox->currentIndex() != ResizeMode::NO_RESIZE)
&& ui->compressionMode_ComboBox->currentIndex() == QUALITY;

ui->losslessWarning_Button->setVisible(showLosslessWarning);
}

void MainWindow::onCompressionModeChanged(int value)
{
this->writeSetting("compression_options/compression/mode", ui->compressionMode_ComboBox->currentIndex());

this->toggleLosslessWarningVisible();
}

0 comments on commit 196bef6

Please sign in to comment.