From d24390bd9801b78a6f666e5b3d0cb0349f9416a8 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 1 Dec 2015 16:38:09 +0200 Subject: [PATCH] Set of fixes for better look on Mac OS X. --HG-- branch : develop --- src/app/tape/dialogs/dialogabouttape.ui | 6 +- src/app/tape/tmainwindow.cpp | 24 +- src/app/tape/tmainwindow.ui | 226 ++++++++++++++++-- src/app/valentina/dialogs/dialogaboutapp.ui | 12 +- src/app/valentina/dialogs/dialogincrements.ui | 32 ++- .../dialogs/support/dialogeditwrongformula.ui | 30 ++- 6 files changed, 283 insertions(+), 47 deletions(-) diff --git a/src/app/tape/dialogs/dialogabouttape.ui b/src/app/tape/dialogs/dialogabouttape.ui index 9df2b3409..28a05b991 100644 --- a/src/app/tape/dialogs/dialogabouttape.ui +++ b/src/app/tape/dialogs/dialogabouttape.ui @@ -162,7 +162,7 @@ 0 - 10 + 0 @@ -181,7 +181,7 @@ 0 - 10 + 0 @@ -200,7 +200,7 @@ 0 - 10 + 0 diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index e93217225..0cc1a5f36 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -107,6 +107,11 @@ TMainWindow::TMainWindow(QWidget *parent) setWindowTitle(tr("untitled %1").arg(qApp->MainWindows().size()+1)); ReadSettings(); + +#if defined(Q_OS_MAC) + // On Mac deafault icon size is 32x32. + ui->toolBarGradation->setIconSize(QSize(24, 24)); +#endif } //--------------------------------------------------------------------------------------------------------------------- @@ -1206,9 +1211,10 @@ void TMainWindow::ShowMData() ShowMDiagram(meash->GetName()); - ui->lineEditName->blockSignals(true); + // Don't block all signal for QLineEdits. Need for correct handle with clear button. + disconnect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName); ui->plainTextEditDescription->blockSignals(true); - ui->lineEditFullName->blockSignals(true); + disconnect(ui->lineEditFullName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMFullName); if (meash->IsCustom()) { ui->plainTextEditDescription->setPlainText(meash->GetDescription()); @@ -1222,9 +1228,9 @@ void TMainWindow::ShowMData() ui->lineEditFullName->setText(qApp->TrVars()->GuiText(meash->GetName())); ui->lineEditName->setText(nameField->text()); } - ui->lineEditName->blockSignals(false); + connect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName); ui->plainTextEditDescription->blockSignals(false); - ui->lineEditFullName->blockSignals(false); + connect(ui->lineEditFullName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMFullName); if (mType == MeasurementsType::Standard) { @@ -1973,15 +1979,15 @@ void TMainWindow::SetCurrentFile(const QString &fileName) if (curFile.isEmpty()) { shownName = tr("untitled"); - mType == MeasurementsType::Standard ? shownName += ".vst" : shownName += ".vit"; - ui->labelPathToFile->setText(tr("")); - ui->labelPathToFile->setToolTip(tr("File was not saved yet.")); + mType == MeasurementsType::Standard ? shownName += QLatin1Literal(".vst") : shownName += QLatin1Literal(".vit"); + ui->lineEditPathToFile->setText(tr("")); + ui->lineEditPathToFile->setToolTip(tr("File was not saved yet.")); ui->pushButtonShowInExplorer->setEnabled(false); } else { - ui->labelPathToFile->setText(QDir::toNativeSeparators(curFile)); - ui->labelPathToFile->setToolTip(QDir::toNativeSeparators(curFile)); + ui->lineEditPathToFile->setText(QDir::toNativeSeparators(curFile)); + ui->lineEditPathToFile->setToolTip(QDir::toNativeSeparators(curFile)); ui->pushButtonShowInExplorer->setEnabled(true); } shownName += "[*]"; diff --git a/src/app/tape/tmainwindow.ui b/src/app/tape/tmainwindow.ui index f0605b074..94ef86ffc 100644 --- a/src/app/tape/tmainwindow.ui +++ b/src/app/tape/tmainwindow.ui @@ -7,7 +7,7 @@ 0 0 835 - 726 + 719 @@ -25,7 +25,7 @@ - + @@ -36,6 +36,9 @@ <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + + Qt::AlignCenter + @@ -44,7 +47,7 @@ - 0 + 1 @@ -69,6 +72,12 @@ false + + Search + + + true + @@ -190,6 +199,9 @@ Details + + QFormLayout::ExpandingFieldsGrow + @@ -203,7 +215,13 @@ false - Name in formula + Measurement's name in a formula + + + Measurement's name in a formula. + + + true @@ -344,7 +362,7 @@ - + false @@ -398,7 +416,7 @@ - + false @@ -416,10 +434,36 @@ + + + + Qt::Horizontal + + + + 5000 + 20 + + + + + + + + Qt::Horizontal + + + + 5000 + 20 + + + + @@ -511,6 +555,12 @@ + + Measurement's human-readable name. + + + true + @@ -527,6 +577,9 @@ Information + + QFormLayout::ExpandingFieldsGrow + @@ -551,19 +604,31 @@ - + - + 0 0 - - Path to file + + false - + + background: transparent; + + + false + + true + + Path to the measurement file. + + + false + @@ -571,6 +636,12 @@ false + + + 0 + 0 + + Show in Explorer @@ -618,6 +689,18 @@ false + + + 0 + 0 + + + + Customer's name. + + + true + @@ -632,6 +715,18 @@ false + + + 0 + 0 + + + + Customer's family name. + + + true + @@ -646,6 +741,18 @@ false + + + 0 + 0 + + + + + 124 + 0 + + yyyy-MM-dd @@ -671,13 +778,6 @@ - - - - false - - - @@ -690,6 +790,18 @@ false + + + 0 + 0 + + + + Customer's email address. + + + true + @@ -720,11 +832,79 @@ - - - false - - + + + + + false + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + diff --git a/src/app/valentina/dialogs/dialogaboutapp.ui b/src/app/valentina/dialogs/dialogaboutapp.ui index 371e8d05f..1e4ba1e96 100644 --- a/src/app/valentina/dialogs/dialogaboutapp.ui +++ b/src/app/valentina/dialogs/dialogaboutapp.ui @@ -103,6 +103,12 @@ + + + 0 + 0 + + @@ -162,7 +168,7 @@ - + 0 0 @@ -223,7 +229,7 @@ Valentina Zhuravska - + 0 0 @@ -249,7 +255,7 @@ Valentina Zhuravska - + 0 0 diff --git a/src/app/valentina/dialogs/dialogincrements.ui b/src/app/valentina/dialogs/dialogincrements.ui index f8869b2c1..0f4261a5a 100644 --- a/src/app/valentina/dialogs/dialogincrements.ui +++ b/src/app/valentina/dialogs/dialogincrements.ui @@ -146,7 +146,7 @@ - QFormLayout::AllNonFixedFieldsGrow + QFormLayout::ExpandingFieldsGrow @@ -184,6 +184,19 @@ + + + + Qt::Horizontal + + + + 5000 + 20 + + + + @@ -191,11 +204,24 @@ 6 + + + + Qt::Horizontal + + + + 5000 + 20 + + + + - 1 + 0 0 @@ -209,7 +235,7 @@ - + false diff --git a/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui b/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui index 862ef44a5..0c87686d8 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui @@ -227,7 +227,7 @@ - + 0 0 @@ -243,7 +243,7 @@ - + 0 0 @@ -259,7 +259,7 @@ true - + 0 0 @@ -275,7 +275,7 @@ true - + 0 0 @@ -291,7 +291,7 @@ true - + 0 0 @@ -307,7 +307,7 @@ true - + 0 0 @@ -319,6 +319,12 @@ + + + 0 + 0 + + Radius of arcs @@ -326,6 +332,12 @@ + + + 0 + 0 + + Angles of arcs @@ -333,6 +345,12 @@ + + + 0 + 0 + + Angles of curves