UI: Use QDialog for all dialogs
While QWidgets can be opened as dialogs, they don't contain certain functions/defaults that are expected in a dialog.
This commit is contained in:
parent
9a5e094cb3
commit
9613fe7d47
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OBSExtraBrowsers</class>
|
||||
<widget class="QWidget" name="OBSExtraBrowsers">
|
||||
<widget class="QDialog" name="OBSExtraBrowsers">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ScriptsTool</class>
|
||||
<widget class="QWidget" name="ScriptsTool">
|
||||
<widget class="QDialog" name="ScriptsTool">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -85,7 +85,7 @@ static OBSPlainTextEdit *scriptLogWidget = nullptr;
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
ScriptLogWindow::ScriptLogWindow() : QWidget(nullptr)
|
||||
ScriptLogWindow::ScriptLogWindow() : QDialog(nullptr)
|
||||
{
|
||||
OBSPlainTextEdit *edit = new OBSPlainTextEdit();
|
||||
edit->setReadOnly(true);
|
||||
@ -109,6 +109,8 @@ ScriptLogWindow::ScriptLogWindow() : QWidget(nullptr)
|
||||
setLayout(layout);
|
||||
scriptLogWidget = edit;
|
||||
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
resize(600, 400);
|
||||
|
||||
config_t *global_config = obs_frontend_get_global_config();
|
||||
@ -179,8 +181,10 @@ void ScriptLogWindow::Clear()
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
ScriptsTool::ScriptsTool() : QWidget(nullptr), ui(new Ui_ScriptsTool)
|
||||
ScriptsTool::ScriptsTool() : QDialog(nullptr), ui(new Ui_ScriptsTool)
|
||||
{
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
ui->setupUi(this);
|
||||
RefreshLists();
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
#include <memory>
|
||||
|
||||
class Ui_ScriptsTool;
|
||||
|
||||
class ScriptLogWindow : public QWidget {
|
||||
class ScriptLogWindow : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
QString lines;
|
||||
@ -25,7 +25,7 @@ public slots:
|
||||
void ScrollChanged(int val);
|
||||
};
|
||||
|
||||
class ScriptsTool : public QWidget {
|
||||
class ScriptsTool : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
std::unique_ptr<Ui_ScriptsTool> ui;
|
||||
|
Loading…
x
Reference in New Issue
Block a user