filter actions

This commit is contained in:
Joakim L. Gilje
2021-12-06 22:02:18 +01:00
parent 78de384cc4
commit 2d9020070f
3 changed files with 25 additions and 0 deletions

View File

@@ -131,6 +131,14 @@ MainWindow::MainWindow(QWidget *parent) :
ui->action2x->setChecked(true);
break;
}
switch (video_filter_method) {
case 0:
ui->actionNearest->setChecked(true);
break;
case 1:
ui->actionLinear->setChecked(true);
break;
}
setFocusPolicy(Qt::StrongFocus);
ui->gles->setFocusPolicy(Qt::NoFocus);
@@ -915,3 +923,12 @@ void MainWindow::on_action2x_triggered() {
update_scaled_checkboxes(ui, ui->action2x);
}
void MainWindow::on_actionNearest_triggered() {
video_filter_method = 0;
ui->actionLinear->setChecked(false);
}
void MainWindow::on_actionLinear_triggered() {
video_filter_method = 1;
ui->actionNearest->setChecked(false);
}

View File

@@ -62,6 +62,8 @@ private slots:
void on_action1x_triggered();
void on_action1_5x_triggered();
void on_action2x_triggered();
void on_actionLinear_triggered();
void on_actionNearest_triggered();
void refreshMediaMenu();
void showMessage_(const QString& header, const QString& message);

View File

@@ -347,11 +347,17 @@
</property>
</action>
<action name="actionNearest">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Nearest</string>
</property>
</action>
<action name="actionLinear">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Linear</string>
</property>