Added scroll area to layout settings dialog.
This commit is contained in:
parent
e876a4d611
commit
62ff405cc0
|
@ -30,6 +30,7 @@
|
||||||
- [smart-pattern/valentina#43] Background image.
|
- [smart-pattern/valentina#43] Background image.
|
||||||
- Fix alias for tool Cut Arc.
|
- Fix alias for tool Cut Arc.
|
||||||
- Fix infinite loop in tool cut spline.
|
- Fix infinite loop in tool cut spline.
|
||||||
|
- Added scroll area to layout settings dialog.
|
||||||
|
|
||||||
# Valentina 0.7.49 July 1, 2021
|
# Valentina 0.7.49 July 1, 2021
|
||||||
- Fix crash.
|
- Fix crash.
|
||||||
|
|
|
@ -516,7 +516,7 @@ QString DialogLayoutSettings::MakeGroupsHelp()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLayoutSettings::showEvent(QShowEvent *event)
|
void DialogLayoutSettings::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
QDialog::showEvent( event );
|
VAbstractLayoutDialog::showEvent( event );
|
||||||
if ( event->spontaneous() )
|
if ( event->spontaneous() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -528,12 +528,28 @@ void DialogLayoutSettings::showEvent(QShowEvent *event)
|
||||||
}
|
}
|
||||||
// do your init stuff here
|
// do your init stuff here
|
||||||
|
|
||||||
setMaximumSize(size());
|
const QSize sz = VAbstractApplication::VApp()->Settings()->GetLayoutSettingsDialogSize();
|
||||||
setMinimumSize(size());
|
if (not sz.isEmpty())
|
||||||
|
{
|
||||||
|
resize(sz);
|
||||||
|
}
|
||||||
|
|
||||||
isInitialized = true;//first show windows are held
|
isInitialized = true;//first show windows are held
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogLayoutSettings::resizeEvent(QResizeEvent *event)
|
||||||
|
{
|
||||||
|
// remember the size for the next time this dialog is opened, but only
|
||||||
|
// if widget was already initialized, which rules out the resize at
|
||||||
|
// dialog creating, which would
|
||||||
|
if (isInitialized)
|
||||||
|
{
|
||||||
|
VAbstractApplication::VApp()->Settings()->SetLayoutSettingsDialogSize(size());
|
||||||
|
}
|
||||||
|
VAbstractLayoutDialog::resizeEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLayoutSettings::ConvertLayoutSize()
|
void DialogLayoutSettings::ConvertLayoutSize()
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,7 +120,8 @@ public:
|
||||||
qreal PageToPixels(qreal value) const;
|
qreal PageToPixels(qreal value) const;
|
||||||
static QString MakeGroupsHelp();
|
static QString MakeGroupsHelp();
|
||||||
protected:
|
protected:
|
||||||
virtual void showEvent(QShowEvent *event) override;
|
void showEvent(QShowEvent *event) override;
|
||||||
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
QSizeF GetTemplateSize(const PaperSizeTemplate &tmpl, const Unit &unit) const;
|
QSizeF GetTemplateSize(const PaperSizeTemplate &tmpl, const Unit &unit) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>601</width>
|
<width>772</width>
|
||||||
<height>664</height>
|
<height>701</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -17,11 +17,24 @@
|
||||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
|
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>752</width>
|
||||||
|
<height>650</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBoxPaperFormat">
|
<widget class="QGroupBox" name="groupBoxPaperFormat">
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
|
@ -308,8 +321,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBoxText">
|
<widget class="QGroupBox" name="groupBoxText">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -329,8 +340,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -621,10 +630,25 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<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>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
|
|
@ -121,6 +121,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingToolSeamAllowanceDialogSize, (QL
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingIncrementsDialogSize, (QLatin1String("toolIncrementsDialogSize")))
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingIncrementsDialogSize, (QLatin1String("toolIncrementsDialogSize")))
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFormulaWizardDialogSize, (QLatin1String("formulaWizardDialogSize")))
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFormulaWizardDialogSize, (QLatin1String("formulaWizardDialogSize")))
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFinalMeasurementsDialogSize, (QLatin1String("finalMeasurementsDialogSize")))
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFinalMeasurementsDialogSize, (QLatin1String("finalMeasurementsDialogSize")))
|
||||||
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutSettingsDialogSize, (QLatin1String("layoutSettingsDialogSize")))
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingAutomaticallyCheckUpdates, (QLatin1String("automaticallyCheckUpdates")))
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingAutomaticallyCheckUpdates, (QLatin1String("automaticallyCheckUpdates")))
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLatestSkippedVersion, (QLatin1String("lastestSkippedVersion")))
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLatestSkippedVersion, (QLatin1String("lastestSkippedVersion")))
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDateOfLastRemind, (QLatin1String("dateOfLastRemind")))
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDateOfLastRemind, (QLatin1String("dateOfLastRemind")))
|
||||||
|
@ -822,6 +823,18 @@ void VCommonSettings::SetFinalMeasurementsDialogSize(const QSize &sz)
|
||||||
setValue(*settingFinalMeasurementsDialogSize, sz);
|
setValue(*settingFinalMeasurementsDialogSize, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
auto VCommonSettings::GetLayoutSettingsDialogSize() const -> QSize
|
||||||
|
{
|
||||||
|
return value(*settingLayoutSettingsDialogSize, QSize(0, 0)).toSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VCommonSettings::SetLayoutSettingsDialogSize(const QSize &sz)
|
||||||
|
{
|
||||||
|
setValue(*settingLayoutSettingsDialogSize, sz);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
bool VCommonSettings::IsAutomaticallyCheckUpdates() const
|
bool VCommonSettings::IsAutomaticallyCheckUpdates() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,6 +157,9 @@ public:
|
||||||
QSize GetFinalMeasurementsDialogSize() const;
|
QSize GetFinalMeasurementsDialogSize() const;
|
||||||
void SetFinalMeasurementsDialogSize(const QSize& sz);
|
void SetFinalMeasurementsDialogSize(const QSize& sz);
|
||||||
|
|
||||||
|
QSize GetLayoutSettingsDialogSize() const;
|
||||||
|
void SetLayoutSettingsDialogSize(const QSize& sz);
|
||||||
|
|
||||||
bool IsAutomaticallyCheckUpdates() const;
|
bool IsAutomaticallyCheckUpdates() const;
|
||||||
void SetAutomaticallyCheckUpdates(bool value);
|
void SetAutomaticallyCheckUpdates(bool value);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user