r24521 by jghali - #16485: Unify margins and spacing for dialogs, set 11 <bubu>
scribus-commit
scribus-commit at lists.scribus.net
Mon Feb 22 21:22:10 UTC 2021
Author: jghali
Date: Mon Feb 22 21:22:10 2021
New Revision: 24521
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24521
Log:
#16485: Unify margins and spacing for dialogs, set 11 <bubu>
Modified:
trunk/Scribus/scribus/ui/gtdialogs.cpp
trunk/Scribus/scribus/ui/marginwidget.cpp
trunk/Scribus/scribus/ui/pageselector.cpp
trunk/Scribus/scribus/ui/query.cpp
trunk/Scribus/scribus/ui/tabruler.cpp
Modified: trunk/Scribus/scribus/ui/gtdialogs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24521&path=/trunk/Scribus/scribus/ui/gtdialogs.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gtdialogs.cpp (original)
+++ trunk/Scribus/scribus/ui/gtdialogs.cpp Mon Feb 22 21:22:10 2021
@@ -57,8 +57,8 @@
QBoxLayout* layout = new QVBoxLayout(this);
QBoxLayout* llayout = new QHBoxLayout;
- llayout->setMargin(5);
- llayout->setSpacing(5);
+ llayout->setContentsMargins(0, 0, 0, 0);
+ llayout->setSpacing(6);
QString labelText;
if (ext.length() > 0)
@@ -70,8 +70,8 @@
layout->addLayout(llayout);
QBoxLayout* ilayout = new QHBoxLayout;
- ilayout->setMargin(5);
- ilayout->setSpacing(5);
+ ilayout->setContentsMargins(0, 0, 0, 0);
+ ilayout->setSpacing(6);
importerCombo = new QComboBox(this);
importerCombo->setMinimumSize(QSize(150, 0));
importerCombo->setToolTip( tr("Choose the importer to use"));
@@ -84,8 +84,8 @@
layout->addLayout(ilayout);
QBoxLayout* dlayout = new QHBoxLayout;
- dlayout->setMargin(5);
- dlayout->setSpacing(5);
+ dlayout->setContentsMargins(0, 0, 0, 0);
+ dlayout->setSpacing(6);
rememberCheck = new QCheckBox( tr("Remember association"), this);
rememberCheck->setChecked(false);
rememberCheck->setToolTip( "<qt>" + tr("Remember the file extension - importer association and do not ask again to select an importer for files of this type.") + "</qt>" );
@@ -94,8 +94,8 @@
layout->addLayout(dlayout);
QBoxLayout* blayout = new QHBoxLayout;
- blayout->setMargin(5);
- blayout->setSpacing(5);
+ blayout->setContentsMargins(0, 0, 0, 0);
+ blayout->setSpacing(6);
blayout->addStretch(10);
okButton = new QPushButton( CommonStrings::tr_OK, this);
blayout->addWidget(okButton);
Modified: trunk/Scribus/scribus/ui/marginwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24521&path=/trunk/Scribus/scribus/ui/marginwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marginwidget.cpp (original)
+++ trunk/Scribus/scribus/ui/marginwidget.cpp Mon Feb 22 21:22:10 2021
@@ -56,8 +56,8 @@
// layout
GroupLayout = new QGridLayout( marginPage );
- GroupLayout->setSpacing( 5 );
- GroupLayout->setMargin( 10 );
+ GroupLayout->setSpacing(6);
+ GroupLayout->setContentsMargins(9, 9, 9, 9);
GroupLayout->addWidget(presetLabel, 0, 0);
GroupLayout->addWidget(presetCombo, 0, 1);
GroupLayout->addWidget( leftR, 1, 1 );
@@ -72,8 +72,8 @@
if (showChangeAll)
{
marginsForPagesLayout = new QHBoxLayout;
- marginsForPagesLayout->setMargin(5);
- marginsForPagesLayout->setSpacing(5);
+ marginsForPagesLayout->setContentsMargins(9, 9, 9, 9);
+ marginsForPagesLayout->setSpacing(6);
marginsForPages = new QLabel( tr( "Apply settings to:" ), marginPage );
marginsForPagesLayout->addWidget(marginsForPages);
marginsForAllPages = new QCheckBox( marginPage );
@@ -88,15 +88,8 @@
marginsForAllPages->setToolTip( "<qt>" + tr( "Apply the margin changes to all existing pages in the document" ) + "</qt>" );
marginsForAllMasterPages->setToolTip( "<qt>" + tr( "Apply the margin changes to all existing master pages in the document" ) + "</qt>" );
}
- else
- {
- marginsForPagesLayout=nullptr;
- marginsForPages=nullptr;
- marginsForAllPages=nullptr;
- marginsForAllMasterPages=nullptr;
- }
-
- usePrinterMarginsButton=nullptr;
+
+ usePrinterMarginsButton = nullptr;
usePrinterMarginsButton = new QPushButton( tr("Printer Margins..."),marginPage );
GroupLayout->addWidget( usePrinterMarginsButton, 5, 1 );
usePrinterMarginsButton->setToolTip( "<qt>" + tr( "Import the margins for the selected page size from the available printers" ) + "</qt>");
@@ -108,8 +101,8 @@
{
bleedPage = new QWidget(this);
BleedGroupLayout = new QGridLayout( bleedPage );
- BleedGroupLayout->setSpacing( 5 );
- BleedGroupLayout->setMargin( 10 );
+ BleedGroupLayout->setSpacing(6);
+ BleedGroupLayout->setContentsMargins(9, 9, 9, 9);
BleedGroupLayout->setAlignment( Qt::AlignTop );
BleedTxt3 = new QLabel( bleedPage );
BleedGroupLayout->addWidget( BleedTxt3, 0, 0 );
Modified: trunk/Scribus/scribus/ui/pageselector.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24521&path=/trunk/Scribus/scribus/ui/pageselector.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pageselector.cpp (original)
+++ trunk/Scribus/scribus/ui/pageselector.cpp Mon Feb 22 21:22:10 2021
@@ -30,7 +30,7 @@
pageCountString = "%1";
m_lastPage = maximumPage;
pageSelectorLayout = new QHBoxLayout( this );
- pageSelectorLayout->setMargin(0);
+ pageSelectorLayout->setContentsMargins(0, 0, 0, 0);
pageSelectorLayout->setSpacing(1);
startButton = new QPushButton( this );
Modified: trunk/Scribus/scribus/ui/query.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24521&path=/trunk/Scribus/scribus/ui/query.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/query.cpp (original)
+++ trunk/Scribus/scribus/ui/query.cpp Mon Feb 22 21:22:10 2021
@@ -23,11 +23,11 @@
setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
setModal(modal);
queryLayout = new QVBoxLayout( this );
- queryLayout->setMargin(5);
- queryLayout->setSpacing(10);
+ queryLayout->setContentsMargins(9, 9, 9, 9);
+ queryLayout->setSpacing(6);
editLayout = new QHBoxLayout;
- editLayout->setSpacing( 5 );
- editLayout->setMargin( 0 );
+ editLayout->setSpacing(6);
+ editLayout->setContentsMargins(0, 0, 0, 0);
answerEdit = new QLineEdit( this );
questionLabel = new QLabel( text, this );
questionLabel->setBuddy(answerEdit);
@@ -36,8 +36,8 @@
editLayout->addWidget( answerEdit );
queryLayout->addLayout( editLayout );
okCancelLayout = new QHBoxLayout;
- okCancelLayout->setSpacing( 5 );
- okCancelLayout->setMargin( 0 );
+ okCancelLayout->setSpacing(6);
+ okCancelLayout->setContentsMargins(0, 0, 0, 0);
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
okCancelLayout->addItem( spacer );
okButton = new QPushButton( CommonStrings::tr_OK, this);
Modified: trunk/Scribus/scribus/ui/tabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24521&path=/trunk/Scribus/scribus/ui/tabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.cpp (original)
+++ trunk/Scribus/scribus/ui/tabruler.cpp Mon Feb 22 21:22:10 2021
@@ -506,11 +506,11 @@
m_docUnitRatio=unitGetRatioFromIndex(dEin);
double ww = (wid < 0) ? 4000 : wid;
tabrulerLayout = new QVBoxLayout( this );
- tabrulerLayout->setMargin(0);
- tabrulerLayout->setSpacing(5);
+ tabrulerLayout->setContentsMargins(0, 0, 0, 0);
+ tabrulerLayout->setSpacing(6);
layout2 = new QHBoxLayout;
- layout2->setMargin(0);
- layout2->setSpacing(5);
+ layout2->setContentsMargins(0, 0, 0, 0);
+ layout2->setSpacing(6);
rulerScrollL = new QToolButton(this);
rulerScrollL->setArrowType(Qt::LeftArrow);
@@ -525,8 +525,8 @@
layout2->addWidget( rulerScrollR );
layout1 = new QHBoxLayout;
- layout1->setMargin(0);
- layout1->setSpacing(5);
+ layout1->setContentsMargins(0, 0, 0, 0);
+ layout1->setSpacing(6);
layout1->setAlignment( Qt::AlignTop );
typeCombo = new QComboBox(this);
typeCombo->setEditable(false);
@@ -556,12 +556,12 @@
layout1->addWidget( tabFillCombo );
layout4 = new QHBoxLayout;
- layout4->setMargin(0);
- layout4->setSpacing(5);
+ layout4->setContentsMargins(0, 0, 0, 0);
+ layout4->setSpacing(6);
indentLayout = new QHBoxLayout;
- indentLayout->setMargin(0);
- indentLayout->setSpacing(5);
+ indentLayout->setContentsMargins(0, 0, 0, 0);
+ indentLayout->setSpacing(6);
if (haveFirst)
{
firstLineData = new ScrSpinBox( -3000, ww / m_docUnitRatio, this, dEin);
More information about the scribus-commit
mailing list