parent
d4a4518a7e
commit
866e1e15a8
|
@ -40,30 +40,102 @@
|
|||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="previewDisabledLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic.Main.PreviewDisabled</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="previewLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="previewDisabledWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic.Main.PreviewDisabled</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="enablePreviewButton">
|
||||
<property name="text">
|
||||
<string>Basic.Main.PreviewConextMenu.Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="previewTextLayout">
|
||||
<property name="spacing">
|
||||
|
@ -709,8 +781,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>16</width>
|
||||
<height>28</height>
|
||||
<width>28</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
|
|
@ -212,7 +212,7 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||
api = InitializeAPIInterface(this);
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->previewDisabledLabel->setVisible(false);
|
||||
ui->previewDisabledWidget->setVisible(false);
|
||||
|
||||
startingDockLayout = saveState();
|
||||
|
||||
|
@ -381,6 +381,13 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||
ui->previewLabel->setHidden(true);
|
||||
else
|
||||
ui->previewLabel->setHidden(!labels);
|
||||
|
||||
ui->previewDisabledWidget->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(ui->previewDisabledWidget,
|
||||
SIGNAL(customContextMenuRequested(const QPoint &)), this,
|
||||
SLOT(PreviewDisabledMenu(const QPoint &)));
|
||||
connect(ui->enablePreviewButton, SIGNAL(clicked()), this,
|
||||
SLOT(TogglePreview()));
|
||||
}
|
||||
|
||||
static void SaveAudioDevice(const char *name, int channel, obs_data_t *parent,
|
||||
|
@ -5759,8 +5766,7 @@ void OBSBasic::on_program_customContextMenuRequested(const QPoint &)
|
|||
popup.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void OBSBasic::on_previewDisabledLabel_customContextMenuRequested(
|
||||
const QPoint &pos)
|
||||
void OBSBasic::PreviewDisabledMenu(const QPoint &pos)
|
||||
{
|
||||
QMenu popup(this);
|
||||
delete previewProjectorMain;
|
||||
|
@ -6219,7 +6225,7 @@ void OBSBasic::EnablePreviewDisplay(bool enable)
|
|||
{
|
||||
obs_display_set_enabled(ui->preview->GetDisplay(), enable);
|
||||
ui->preview->setVisible(enable);
|
||||
ui->previewDisabledLabel->setVisible(!enable);
|
||||
ui->previewDisabledWidget->setVisible(!enable);
|
||||
}
|
||||
|
||||
void OBSBasic::TogglePreview()
|
||||
|
|
|
@ -729,8 +729,7 @@ private slots:
|
|||
|
||||
void on_preview_customContextMenuRequested(const QPoint &pos);
|
||||
void on_program_customContextMenuRequested(const QPoint &pos);
|
||||
void
|
||||
on_previewDisabledLabel_customContextMenuRequested(const QPoint &pos);
|
||||
void PreviewDisabledMenu(const QPoint &pos);
|
||||
|
||||
void on_actionNewSceneCollection_triggered();
|
||||
void on_actionDupSceneCollection_triggered();
|
||||
|
|
Loading…
Reference in New Issue