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:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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