UI: Add ctrl+up/down shorcuts to move filters around
Adds the same shortcuts in order to move filters around like sources
This commit is contained in:
parent
05e06b9af1
commit
975722f472
@ -437,6 +437,30 @@
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMoveUp">
|
||||
<property name="icon">
|
||||
<iconset resource="obs.qrc">
|
||||
<normaloff>:/res/images/up.png</normaloff>:/res/images/up.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic.MainMenu.Edit.Order.MoveUp</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Up</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMoveDown">
|
||||
<property name="icon">
|
||||
<iconset resource="obs.qrc">
|
||||
<normaloff>:/res/images/down.png</normaloff>:/res/images/down.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic.MainMenu.Edit.Order.MoveDown</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Down</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -77,6 +77,8 @@ OBSBasicFilters::OBSBasicFilters(QWidget *parent, OBSSource source_)
|
||||
#endif // QT_NO_SHORTCUT
|
||||
|
||||
addAction(ui->actionRemoveFilter);
|
||||
addAction(ui->actionMoveUp);
|
||||
addAction(ui->actionMoveDown);
|
||||
|
||||
installEventFilter(CreateShortcutFilter());
|
||||
|
||||
@ -682,6 +684,22 @@ void OBSBasicFilters::on_actionRemoveFilter_triggered()
|
||||
on_removeEffectFilter_clicked();
|
||||
}
|
||||
|
||||
void OBSBasicFilters::on_actionMoveUp_triggered()
|
||||
{
|
||||
if (ui->asyncFilters->hasFocus())
|
||||
on_moveAsyncFilterUp_clicked();
|
||||
else if (ui->effectFilters->hasFocus())
|
||||
on_moveEffectFilterUp_clicked();
|
||||
}
|
||||
|
||||
void OBSBasicFilters::on_actionMoveDown_triggered()
|
||||
{
|
||||
if (ui->asyncFilters->hasFocus())
|
||||
on_moveAsyncFilterDown_clicked();
|
||||
else if (ui->effectFilters->hasFocus())
|
||||
on_moveEffectFilterDown_clicked();
|
||||
}
|
||||
|
||||
void OBSBasicFilters::CustomContextMenu(const QPoint &pos, bool async)
|
||||
{
|
||||
QListWidget *list = async ? ui->asyncFilters : ui->effectFilters;
|
||||
|
@ -101,6 +101,8 @@ private slots:
|
||||
void on_effectFilters_GotFocus();
|
||||
|
||||
void on_actionRemoveFilter_triggered();
|
||||
void on_actionMoveUp_triggered();
|
||||
void on_actionMoveDown_triggered();
|
||||
|
||||
void AsyncFilterNameEdited(QWidget *editor,
|
||||
QAbstractItemDelegate::EndEditHint endHint);
|
||||
|
Loading…
x
Reference in New Issue
Block a user