Some dialogs should behave like windows on mac.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-03-12 12:42:43 +02:00
parent 20840667bb
commit a2c54fc7f3
9 changed files with 64 additions and 0 deletions

View File

@ -61,6 +61,11 @@ DialogMDataBase::DialogMDataBase(const QStringList &list, QWidget *parent)
groupQ(nullptr)
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
InitDataBase(list);
ui->treeWidget->installEventFilter(this);
@ -99,6 +104,11 @@ DialogMDataBase::DialogMDataBase(QWidget *parent)
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
InitDataBase();
ui->treeWidget->installEventFilter(this);

View File

@ -45,6 +45,10 @@ DialogTapePreferences::DialogTapePreferences(QWidget *parent)
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);

View File

@ -75,6 +75,10 @@ DialogFinalMeasurements::DialogFinalMeasurements(VPattern *doc, QWidget *parent)
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
ui->lineEditName->setClearButtonEnabled(true);
ui->lineEditFind->setClearButtonEnabled(true);

View File

@ -69,6 +69,10 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
ui->lineEditName->setClearButtonEnabled(true);
ui->lineEditFind->setClearButtonEnabled(true);
ui->lineEditNamePC->setClearButtonEnabled(true);

View File

@ -45,6 +45,9 @@
<attribute name="title">
<string>Increments</string>
</attribute>
<attribute name="toolTip">
<string>Increments</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
@ -484,6 +487,9 @@
<attribute name="title">
<string>Preview calculations</string>
</attribute>
<attribute name="toolTip">
<string>Preview calculations</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
@ -923,6 +929,9 @@
<attribute name="title">
<string>Lines</string>
</attribute>
<attribute name="toolTip">
<string>Lines</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidgetLines">
@ -962,6 +971,9 @@
<attribute name="title">
<string>Lines angles</string>
</attribute>
<attribute name="toolTip">
<string>Lines angles</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidgetLinesAngles">
@ -1001,6 +1013,9 @@
<attribute name="title">
<string>Lengths curves</string>
</attribute>
<attribute name="toolTip">
<string>Lengths curves</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidgetSplines">
@ -1040,6 +1055,9 @@
<attribute name="title">
<string>Curves control point lengths</string>
</attribute>
<attribute name="toolTip">
<string>Curves control point lengths</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTableWidget" name="tableWidgetCLength">
@ -1079,6 +1097,9 @@
<attribute name="title">
<string>Angles curves</string>
</attribute>
<attribute name="toolTip">
<string>Angles curves</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidgetAnglesCurves">
@ -1118,6 +1139,9 @@
<attribute name="title">
<string>Radiuses arcs</string>
</attribute>
<attribute name="toolTip">
<string>Radiuses arcs</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidgetRadiusesArcs">

View File

@ -75,6 +75,10 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, VContainer *pat
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
SCASSERT(doc != nullptr)
VSettings *settings = qApp->ValentinaSettings();

View File

@ -46,6 +46,11 @@ DialogPreferences::DialogPreferences(QWidget *parent)
m_pathPage(new PreferencesPathPage)
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);

View File

@ -61,6 +61,10 @@ DialogSaveLayout::DialogSaveLayout(int count, Draw mode, const QString &fileName
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
ui->lineEditPath->setClearButtonEnabled(true);
ui->lineEditFileName->setClearButtonEnabled(true);

View File

@ -78,6 +78,11 @@ DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const qui
checkZero(false), checkLessThanZero(false), postfix(QString()), restoreCursor(false)
{
ui->setupUi(this);
#if defined(Q_OS_MAC)
setWindowFlags(Qt::Window);
#endif
InitVariables();
InitFormulaUI(ui);
this->formulaBaseHeight = ui->plainTextEditFormula->height();