Index: scribus/ui/newdocdialog.cpp =================================================================== --- scribus/ui/newdocdialog.cpp (Revision 26349) +++ scribus/ui/newdocdialog.cpp (Arbeitskopie) @@ -31,6 +31,7 @@ #include #include #include +#include #include "commonstrings.h" #include "filedialogeventcatcher.h" @@ -52,6 +53,8 @@ { setupUi(this); + windowFitInScreen(); + setObjectName(QString::fromLocal8Bit("NewDocumentWindow")); setModal(true); @@ -67,6 +70,7 @@ buttonVertical->setIcon(iconManager.loadIcon("page-orientation-vertical")); buttonHorizontal->setIcon(iconManager.loadIcon("page-orientation-horizontal")); + labelColumns->setPixmap(iconManager.loadPixmap("paragraph-columns")); createNewDocPage(); if (startUp) @@ -153,11 +157,13 @@ widthSpinBox->setMaximum(16777215); widthSpinBox->setNewUnit(m_unitIndex); widthSpinBox->setSuffix(m_unitSuffix); + widthSpinBox->setValue(pageWidth * m_unitRatio); heightSpinBox->setMinimum(pts2value(1.0, m_unitIndex)); heightSpinBox->setMaximum(16777215); heightSpinBox->setNewUnit(m_unitIndex); heightSpinBox->setSuffix(m_unitSuffix); + heightSpinBox->setValue(pageHeight * m_unitRatio); unitOfMeasureComboBox->addItems(unitGetTextUnitList()); unitOfMeasureComboBox->setCurrentIndex(m_unitIndex); @@ -165,22 +171,20 @@ MarginStruct marg(prefsManager.appPrefs.docSetupPrefs.margins); marginGroup->setup(marg, !(pagePositioning == singlePage), m_unitIndex, NewMarginWidget::MarginWidgetFlags); + marginGroup->toggleLabelVisibility(false); marginGroup->setPageHeight(pageHeight); marginGroup->setPageWidth(pageWidth); marginGroup->setFacingPages(!(pagePositioning == singlePage)); + marginGroup->setPageSize(pageSize); + marginGroup->setMarginPreset(prefsManager.appPrefs.docSetupPrefs.marginPreset); MarginStruct bleed; bleed.resetToZero(); - bleedGroup->setup(bleed, !(pagePositioning == singlePage), m_unitIndex, NewMarginWidget::BleedWidgetFlags); + bleedGroup->toggleLabelVisibility(false); bleedGroup->setPageHeight(pageHeight); bleedGroup->setPageWidth(pageWidth); bleedGroup->setFacingPages(!(pagePositioning == singlePage)); - widthSpinBox->setValue(pageWidth * m_unitRatio); - heightSpinBox->setValue(pageHeight * m_unitRatio); - - marginGroup->setPageSize(pageSize); - marginGroup->setMarginPreset(prefsManager.appPrefs.docSetupPrefs.marginPreset); bleedGroup->setPageSize(pageSize); bleedGroup->setMarginPreset(prefsManager.appPrefs.docSetupPrefs.marginPreset); @@ -233,7 +237,7 @@ // We have to calculate the width of the properties panel manually, // because QSizePolicy::Minimum doesn't work as expected scrollAreaWidgetContents->adjustSize(); - scrollAreaWidgetContents->setFixedWidth(scrollAreaWidgetContents->width()); + //scrollAreaWidgetContents->setFixedWidth(scrollAreaWidgetContents->width()); scrollArea->setWidgetResizable(true); scrollArea->setFixedWidth(scrollAreaWidgetContents->width() + qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent)); @@ -380,6 +384,31 @@ listPageFormats->setSortMode(static_cast(comboSortSizes->currentData().toInt())); } +void NewDocDialog::windowFitInScreen() +{ + QScreen* activeScreen = nullptr; + QWidget* widget = this; + + while (widget) + { + auto w = widget->windowHandle(); + if (w != nullptr) + { + activeScreen = w->screen(); + break; + } + else + widget = widget->parentWidget(); + } + + if (activeScreen) + { + int w = qMin(width(), activeScreen->availableSize().width()); + int h = qMin(height(), activeScreen->availableSize().height()); + resize(w, h); + } +} + void NewDocDialog::handleAutoFrame() { if (autoTextFrame->isChecked()) Index: scribus/ui/newdocdialog.h =================================================================== --- scribus/ui/newdocdialog.h (Revision 26349) +++ scribus/ui/newdocdialog.h (Arbeitskopie) @@ -137,6 +137,8 @@ double m_bleedTop { 0.0 }; double m_bleedLeft { 0.0 }; double m_bleedRight { 0.0 }; + + void windowFitInScreen(); }; #endif // NEWDOC_H Index: scribus/ui/newdocdialog.ui =================================================================== --- scribus/ui/newdocdialog.ui (Revision 26349) +++ scribus/ui/newdocdialog.ui (Arbeitskopie) @@ -7,7 +7,7 @@ 0 0 900 - 680 + 650 @@ -41,7 +41,7 @@ New Document - + 4 @@ -95,12 +95,6 @@ - - - 0 - 0 - - QFrame::Shape::NoFrame @@ -118,8 +112,8 @@ 0 0 - 304 - 624 + 320 + 626 @@ -679,11 +673,21 @@ - - - Show Document Settings After Creation + + + 8 - + + 8 + + + + + Show Document Settings After Creation + + + + Index: scribus/ui/newmarginwidget.cpp =================================================================== --- scribus/ui/newmarginwidget.cpp (Revision 26349) +++ scribus/ui/newmarginwidget.cpp (Arbeitskopie) @@ -74,11 +74,11 @@ { topMarginSpinBox->setToolTip( "" + tr( "Distance between the top margin guide and the edge of the page" ) + ""); bottomMarginSpinBox->setToolTip( "" + tr( "Distance between the bottom margin guide and the edge of the page" ) + ""); - leftMarginSpinBox->setToolTip( "" + tr( "Distance between the left margin guide and the edge of the page. If a double-sided, 3 or 4-fold layout is selected, this margin space can be used to achieve the correct margins for binding.") + ""); - rightMarginSpinBox->setToolTip( "" + tr( "Distance between the right margin guide and the edge of the page. If a double-sided, 3 or 4-fold layout is selected, this margin space can be used to achieve the correct margins for binding.") + ""); + leftMarginSpinBox->setToolTip( "" + tr( "Distance between the left margin guide and the edge of the page. If a double-sided layout is selected, this margin space can be used to achieve the correct margins for binding.") + ""); + rightMarginSpinBox->setToolTip( "" + tr( "Distance between the right margin guide and the edge of the page. If a double-sided layout is selected, this margin space can be used to achieve the correct margins for binding.") + ""); marginLinkButton->setToolTip( "" + tr( "Ensure all margins have the same value" ) + ""); } - else if (m_flags & BleedWidgetFlags) + else if (m_flags & BleedWidgetFlags) { topMarginSpinBox->setToolTip( "" + tr( "Distance for bleed from the top of the physical page" ) + "" ); bottomMarginSpinBox->setToolTip( "" + tr( "Distance for bleed from the bottom of the physical page" ) + "" ); @@ -390,10 +390,11 @@ { m_facingPages = facing; m_pageType = pageType; - - leftMarginLabel->setText( m_facingPages ? tr("Inside") : tr("Left")); - rightMarginLabel->setText( m_facingPages ? tr("Outside") : tr("Right")); - + + leftMarginLabel->setText( m_facingPages ? tr("Inside") : tr("Left")); + rightMarginLabel->setText( m_facingPages ? tr("Outside") : tr("Right")); + + iconSetChange(); setPreset(); }