Implement 'Order' menu
Contains Move Up, Move Down, Move to Top, Move to Bottom. Also assigns Ctrl-Up, Ctrl-Down, Ctrl-Home, Ctrl-End to each action. This was also added to the right-click context menu popup for sources.
This commit is contained in:
parent
0b52828086
commit
18966a9ca0
@ -139,6 +139,11 @@ Basic.MainMenu.Edit.Transform.FlipVertical="Flip &Vertical"
|
||||
Basic.MainMenu.Edit.Transform.FitToScreen="&Fit to screen"
|
||||
Basic.MainMenu.Edit.Transform.StretchToScreen="&Stretch to screen"
|
||||
Basic.MainMenu.Edit.Transform.CenterToScreen="&Center to screen"
|
||||
Basic.MainMenu.Edit.Order="&Order"
|
||||
Basic.MainMenu.Edit.Order.MoveUp="Move &Up"
|
||||
Basic.MainMenu.Edit.Order.MoveDown="Move &Down"
|
||||
Basic.MainMenu.Edit.Order.MoveToTop="Move to &Top"
|
||||
Basic.MainMenu.Edit.Order.MoveToBottom="Move to &Bottom"
|
||||
|
||||
# basic mode help menu
|
||||
Basic.MainMenu.Help="&Help"
|
||||
|
@ -491,10 +491,21 @@
|
||||
<addaction name="actionStretchToScreen"/>
|
||||
<addaction name="actionCenterToScreen"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="orderMenu">
|
||||
<property name="title">
|
||||
<string>Basic.MainMenu.Edit.Order</string>
|
||||
</property>
|
||||
<addaction name="actionMoveUp"/>
|
||||
<addaction name="actionMoveDown"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionMoveToTop"/>
|
||||
<addaction name="actionMoveToBottom"/>
|
||||
</widget>
|
||||
<addaction name="actionUndo"/>
|
||||
<addaction name="actionRedo"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="transformMenu"/>
|
||||
<addaction name="orderMenu"/>
|
||||
</widget>
|
||||
<addaction name="menu_File"/>
|
||||
<addaction name="menuBasic_MainMenu_Edit"/>
|
||||
@ -725,6 +736,38 @@
|
||||
<string>Basic.MainMenu.Edit.Transform.FlipVertical</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMoveUp">
|
||||
<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="text">
|
||||
<string>Basic.MainMenu.Edit.Order.MoveDown</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Down</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMoveToTop">
|
||||
<property name="text">
|
||||
<string>Basic.MainMenu.Edit.Order.MoveToTop</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Home</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMoveToBottom">
|
||||
<property name="text">
|
||||
<string>Basic.MainMenu.Edit.Order.MoveToBottom</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+End</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -1383,6 +1383,8 @@ void OBSBasic::on_sources_customContextMenuRequested(const QPoint &pos)
|
||||
popup.addAction(QTStr("Remove"), this,
|
||||
SLOT(on_actionRemoveSource_triggered()),
|
||||
QKeySequence::Delete);
|
||||
popup.addSeparator();
|
||||
popup.addMenu(ui->orderMenu);
|
||||
popup.addMenu(ui->transformMenu);
|
||||
popup.addSeparator();
|
||||
popup.addAction(QTStr("Properties"), this,
|
||||
@ -1493,6 +1495,30 @@ void OBSBasic::on_actionSourceDown_triggered()
|
||||
obs_sceneitem_setorder(item, ORDER_MOVE_DOWN);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionMoveUp_triggered()
|
||||
{
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
obs_sceneitem_setorder(item, ORDER_MOVE_UP);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionMoveDown_triggered()
|
||||
{
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
obs_sceneitem_setorder(item, ORDER_MOVE_DOWN);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionMoveToTop_triggered()
|
||||
{
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
obs_sceneitem_setorder(item, ORDER_MOVE_TOP);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionMoveToBottom_triggered()
|
||||
{
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
obs_sceneitem_setorder(item, ORDER_MOVE_BOTTOM);
|
||||
}
|
||||
|
||||
static char *ReadLogFile(const char *log)
|
||||
{
|
||||
BPtr<char> logDir(os_get_config_path("obs-studio/logs"));
|
||||
|
@ -241,6 +241,11 @@ private slots:
|
||||
void on_actionSourceUp_triggered();
|
||||
void on_actionSourceDown_triggered();
|
||||
|
||||
void on_actionMoveUp_triggered();
|
||||
void on_actionMoveDown_triggered();
|
||||
void on_actionMoveToTop_triggered();
|
||||
void on_actionMoveToBottom_triggered();
|
||||
|
||||
void on_streamButton_clicked();
|
||||
void on_recordButton_clicked();
|
||||
void on_settingsButton_clicked();
|
||||
|
Loading…
x
Reference in New Issue
Block a user