Set of fixes for better look on Mac OS X.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-01 16:38:09 +02:00
parent 85bb6141ab
commit d24390bd98
6 changed files with 283 additions and 47 deletions

View file

@ -162,7 +162,7 @@
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
<height>0</height>
</size>
</property>
<property name="text">
@ -181,7 +181,7 @@
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
<height>0</height>
</size>
</property>
<property name="text">
@ -200,7 +200,7 @@
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
<height>0</height>
</size>
</property>
<property name="text">

View file

@ -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("<Empty>"));
ui->labelPathToFile->setToolTip(tr("File was not saved yet."));
mType == MeasurementsType::Standard ? shownName += QLatin1Literal(".vst") : shownName += QLatin1Literal(".vit");
ui->lineEditPathToFile->setText(tr("<Empty>"));
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 += "[*]";

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>835</width>
<height>726</height>
<height>719</height>
</rect>
</property>
<property name="windowTitle">
@ -25,7 +25,7 @@
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item alignment="Qt::AlignHCenter">
<item>
<widget class="QLabel" name="labelToolTip">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@ -36,6 +36,9 @@
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:18pt;&quot;&gt;Select New for creation measurement file.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
@ -44,7 +47,7 @@
<string/>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabMeasurements">
<attribute name="icon">
@ -69,6 +72,12 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="placeholderText">
<string>Search</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item>
@ -190,6 +199,9 @@
<string>Details</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
@ -203,7 +215,13 @@
<bool>false</bool>
</property>
<property name="toolTip">
<string>Name in formula</string>
<string>Measurement's name in a formula</string>
</property>
<property name="placeholderText">
<string>Measurement's name in a formula.</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
@ -344,7 +362,7 @@
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<item alignment="Qt::AlignLeft">
<widget class="QToolButton" name="toolButtonTop">
<property name="enabled">
<bool>false</bool>
@ -398,7 +416,7 @@
</property>
</widget>
</item>
<item>
<item alignment="Qt::AlignLeft">
<widget class="QToolButton" name="toolButtonBottom">
<property name="enabled">
<bool>false</bool>
@ -416,10 +434,36 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5000</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5000</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignRight">
<widget class="QToolButton" name="toolButtonRemove">
<property name="enabled">
@ -511,6 +555,12 @@
<property name="toolTip">
<string/>
</property>
<property name="placeholderText">
<string>Measurement's human-readable name.</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -527,6 +577,9 @@
<string>Information</string>
</attribute>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
@ -551,19 +604,31 @@
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayoutPath">
<item>
<widget class="QLabel" name="labelPathToFile">
<widget class="QLineEdit" name="lineEditPathToFile">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Path to file</string>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="wordWrap">
<property name="styleSheet">
<string notr="true">background: transparent;</string>
</property>
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="placeholderText">
<string notr="true">Path to the measurement file.</string>
</property>
<property name="clearButtonEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<item alignment="Qt::AlignRight">
@ -571,6 +636,12 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Show in Explorer</string>
</property>
@ -618,6 +689,18 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="placeholderText">
<string>Customer's name.</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0">
@ -632,6 +715,18 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="placeholderText">
<string>Customer's family name.</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0">
@ -646,6 +741,18 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>124</width>
<height>0</height>
</size>
</property>
<property name="displayFormat">
<string>yyyy-MM-dd</string>
</property>
@ -671,13 +778,6 @@
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="comboBoxGender">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="labelEmail">
<property name="text">
@ -690,6 +790,18 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="placeholderText">
<string>Customer's email address.</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0">
@ -720,11 +832,79 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="comboBoxPMSystem">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QComboBox" name="comboBoxPMSystem">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="8" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QComboBox" name="comboBoxGender">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<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>
</layout>
</widget>

View file

@ -103,6 +103,12 @@
</item>
<item>
<widget class="QPushButton" name="pushButton_Web_Site">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
@ -162,7 +168,7 @@
<item>
<widget class="QLabel" name="label_contrib_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -223,7 +229,7 @@ Valentina Zhuravska </string>
<item>
<widget class="QLabel" name="label_Valentina_Built">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -249,7 +255,7 @@ Valentina Zhuravska </string>
<item>
<widget class="QLabel" name="label_QT_Version">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>

View file

@ -146,7 +146,7 @@
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
@ -184,6 +184,19 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5000</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
@ -191,11 +204,24 @@
<property name="spacing">
<number>6</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5000</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignRight">
<widget class="QToolButton" name="toolButtonAdd">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>1</horstretch>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
@ -209,7 +235,7 @@
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<item alignment="Qt::AlignLeft">
<widget class="QToolButton" name="toolButtonRemove">
<property name="enabled">
<bool>false</bool>

View file

@ -227,7 +227,7 @@
<item>
<widget class="QRadioButton" name="radioButtonStandardTable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -243,7 +243,7 @@
<item>
<widget class="QRadioButton" name="radioButtonIncrements">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -259,7 +259,7 @@
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -275,7 +275,7 @@
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -291,7 +291,7 @@
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -307,7 +307,7 @@
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -319,6 +319,12 @@
</item>
<item>
<widget class="QRadioButton" name="radioButtonRadiusesArcs">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Radius of arcs</string>
</property>
@ -326,6 +332,12 @@
</item>
<item>
<widget class="QRadioButton" name="radioButtonAnglesArcs">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Angles of arcs</string>
</property>
@ -333,6 +345,12 @@
</item>
<item>
<widget class="QRadioButton" name="radioButtonAnglesCurves">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Angles of curves</string>
</property>