From c3d27b65e2a52523085631dfe174862188d7ee7d Mon Sep 17 00:00:00 2001 Message-Id: From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= Date: Tue, 2 Mar 2021 00:24:15 +0100 Subject: [PATCH] Update layout for Style Manager: fontcombo, styleselect, tabruler --- .../iconsets/1_5_1/16/edit-delete-all.png | Bin 0 -> 1528 bytes .../1_5_1_dark/16/edit-delete-all.png | Bin 0 -> 1460 bytes scribus/ui/fontcombo.cpp | 7 +- scribus/ui/smcstylewidget.ui | 45 +++++++----- scribus/ui/smpstylewidget.ui | 65 ++++++++++-------- scribus/ui/smtabruler.cpp | 6 +- scribus/ui/styleselect.cpp | 20 +++--- scribus/ui/tabruler.cpp | 37 +++++----- scribus/ui/tabruler.h | 2 - 9 files changed, 99 insertions(+), 83 deletions(-) diff --git a/resources/iconsets/1_5_1/16/edit-delete-all.png b/resources/iconsets/1_5_1/16/edit-delete-all.png new file mode 100644 index 0000000000000000000000000000000000000000..07dc1eadfc540c5e48227966a9f55e6cf7da2651 GIT binary patch literal 1528 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+T~YSlI182{O1&N1SBB@$H6QSbAvhlB-nmiRad{I zV}8bj5f-vYX9`}G>;L>c++VoZ`{;sNiaAD)E98*5V37QN<<*l9t3Mw6Ik@w?%LKzE zu(Cf|IpPcadVS$sgSLCWOUDeSBhi`pNGNkcSlDIAG%-v==#yM?;(ZtD@a zpd9yhBwdL7{_JiY!N5{eEF{cbNc`&4jzH#3Qeb8EG~>_;ZgVgsClU~H_jwlr{VhRv zB%dSq$o^&YKt7klFArSCgCh*Sogn?5{6+E2!g4{x_Y--XslJjtMoVM#{p(7IU^E^T zwaBJ34FWe%F6*_3X1En&TP>p{Uwnn+%~!vnRm#LrWjG4dsL-IkY^4f_fjb*4bA?dT zm&7=8omxqljRu=!X_BB>=L@AOtW+MWR2?7-$X9>JP0aE1#kQ_uJJLAN2ZMpBbA%86b6P;~GuHAYtglI_RR^Rk^2hbDEyg zjen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ld*wCkRC+kG#49musIBMlvS*zi$Cy;3`=K9o18(MgRLsX5NB)L;!} z7Z)^-6P?UJj1z&lO#(=0p3I_CN<7I;X0gmOO&LMzWD`0~VnCR7VjXm4_d)I@ZbAJe zZu~oPVWRsEaslWbxjmuQ=Xb6xV#h9=nnuCyL;vnIu-Exft9LbK)=#G2)q&rf@Z;!4 zZ+w=1)%6TT_?~zk9K9RIM;*Q=o*zfApa}18&*ydcvp7D&_}TscgQE+I@I5E?myeOh zln8$o$ItHnvZJq`*e~t=myZ$rrGft-!@rl}u71^1q~`zt0flKpLr_UWLm+T+Z)Rz1 zWdHzpoPCi!NW)MRg-=sOk%~h*h&TkS;$T5k#8InIgbJZnXw|{wrGL<*AxUv@6kH1q z{w!79}qV;Cq)-2@xG+cBE}1k_i^4mhxhISgnF52R>wG?>9(0l#KlZ@ zRqT325CMcSiXoX<#+)Q2;agw#)Jt_2<5~WFe^#%WvltK%iD#K%+Qb{g)0?)zd7n7K zin2<4PCRDP1&JTIu6X>$x!|(EGb3g?HBTHN77J~xv@t818u1iyRMm9K7cw5JoVPe@ zRRSZ&0xHlT zyMFLL_&r-IKRMwgh2lWxi{pF@16{j7qvkl@$BxrD0fNuKmEQ7K>cGq=>9v*?Jp%f+ zfs5;wrtATiJ3#-FA)B%*1!)QSJn()--;@Qyw?NODH@D_FP9K0Y%_?~V92^281c1c7*R5;7+k}(Q^FbqXs)NAPA$z8of zjv|N$aB)=YqEHH{5y8m^9ezripWg}*s>)MDRYO`!^awPOo?=}Y7q38R?A5^4bQ5EQ z;2ptoAVBLlKjbp-xR8RENah*8aZow_L6$#*dsetMargin(0); - fontComboLayout->setSpacing(0); + fontComboLayout->setContentsMargins(0, 0, 0, 0); + if (showLabels) + fontComboLayout->setSpacing(6); + else + fontComboLayout->setSpacing(3); int col = 0; if (showLabels) { diff --git a/scribus/ui/smcstylewidget.ui b/scribus/ui/smcstylewidget.ui index 54ed97549..9bdb4edea 100644 --- a/scribus/ui/smcstylewidget.ui +++ b/scribus/ui/smcstylewidget.ui @@ -6,8 +6,8 @@ 0 0 - 402 - 563 + 430 + 607 @@ -435,22 +435,6 @@ - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 300 - 0 - - - - @@ -470,7 +454,14 @@ - + + + + 60 + 16777215 + + + @@ -773,6 +764,22 @@ + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 300 + 0 + + + + diff --git a/scribus/ui/smpstylewidget.ui b/scribus/ui/smpstylewidget.ui index 942164eea..89047a832 100644 --- a/scribus/ui/smpstylewidget.ui +++ b/scribus/ui/smpstylewidget.ui @@ -7,7 +7,7 @@ 0 0 695 - 582 + 596 @@ -251,6 +251,19 @@ + + + + Qt::Vertical + + + + 20 + 0 + + + + @@ -372,27 +385,16 @@ Optical Margins - - - - - - Reset to Default - - - - - + + + + - Use Parent Value + Left Only - - - - - + @@ -421,14 +423,7 @@ - - - - Left Only - - - - + @@ -441,6 +436,20 @@ + + + + Reset to Default + + + + + + + Use Parent Value + + + @@ -1333,11 +1342,7 @@ keepTogether keepWithNext optMarginRadioNone - optMarginRadioBoth optMarginRadioLeft - optMarginRadioRight - optMarginDefaultButton - optMarginParentButton minSpaceSpin maxGlyphExtSpin bulletBox diff --git a/scribus/ui/smtabruler.cpp b/scribus/ui/smtabruler.cpp index 81e23d76a..87174a83e 100644 --- a/scribus/ui/smtabruler.cpp +++ b/scribus/ui/smtabruler.cpp @@ -35,14 +35,14 @@ SMTabruler::SMTabruler(QWidget* parent, bool haveFirst, int dEin, QListinsertWidget(1, first_); first_->show(); - layout4->removeWidget(leftIndentData); + indentLayout->removeWidget(leftIndentData); leftIndentData->hide(); - layout4->insertWidget(1, left_); + indentLayout->insertWidget(3, left_); left_->show(); indentLayout->removeWidget(rightIndentData); rightIndentData->hide(); - indentLayout->insertWidget(3, right_); + indentLayout->insertWidget(5, right_); right_->show(); connect(firstLineData, SIGNAL(valueChanged(double)), this, SLOT(firstDataChanged())); diff --git a/scribus/ui/styleselect.cpp b/scribus/ui/styleselect.cpp index 5521c3085..0b400a013 100644 --- a/scribus/ui/styleselect.cpp +++ b/scribus/ui/styleselect.cpp @@ -14,8 +14,8 @@ for which a new license (GPL+exception) is in place. StrikeValues::StrikeValues( QWidget* parent ) : QFrame( parent ) { group1Layout = new QGridLayout( this ); - group1Layout->setSpacing( 3 ); - group1Layout->setMargin( 2 ); + group1Layout->setSpacing(3); + group1Layout->setContentsMargins(3, 3, 3, 3); group1Layout->setAlignment( Qt::AlignTop ); LPos = new ScrSpinBox( -0.1, 100, this, 0 ); LPos->setValue( -0.1 ); @@ -47,8 +47,8 @@ void StrikeValues::languageChange() UnderlineValues::UnderlineValues( QWidget* parent ) : QFrame( parent ) { group1Layout = new QGridLayout(this); - group1Layout->setSpacing( 3 ); - group1Layout->setMargin( 2 ); + group1Layout->setSpacing(3); + group1Layout->setContentsMargins(3, 3, 3, 3); group1Layout->setAlignment( Qt::AlignTop ); LPos = new ScrSpinBox( -0.1, 100, this, 0 ); LPos->setValue( -0.1 ); @@ -80,8 +80,8 @@ void UnderlineValues::languageChange() OutlineValues::OutlineValues( QWidget* parent ) : QFrame( parent ) { group1Layout = new QGridLayout( this ); - group1Layout->setSpacing( 3 ); - group1Layout->setMargin( 2 ); + group1Layout->setSpacing(3); + group1Layout->setContentsMargins(3, 3, 3, 3); group1Layout->setAlignment( Qt::AlignTop ); LWidth = new ScrSpinBox( 0, 100, this, 0 ); LWidth->setValue( 1 ); @@ -101,8 +101,8 @@ void OutlineValues::languageChange() ShadowValues::ShadowValues( QWidget* parent ) : QFrame( parent ) { group1Layout = new QGridLayout( this ); - group1Layout->setSpacing( 3 ); - group1Layout->setMargin( 2 ); + group1Layout->setSpacing(3); + group1Layout->setContentsMargins(3, 3, 3, 3); group1Layout->setAlignment( Qt::AlignTop ); Xoffset = new ScrSpinBox( -100, 100, this, 0 ); Xoffset->setValue( 5 ); @@ -131,8 +131,8 @@ StyleSelect::StyleSelect(QWidget* parent) : QWidget(parent) { IconManager& im = IconManager::instance(); ssLayout = new QHBoxLayout(this); - ssLayout->setSpacing( 0 ); - ssLayout->setMargin( 0 ); + ssLayout->setSpacing(3); + ssLayout->setContentsMargins(0, 0, 0, 0); UnderlineVal = new UnderlineValues( nullptr ); UnderlinePop = new QMenu(); diff --git a/scribus/ui/tabruler.cpp b/scribus/ui/tabruler.cpp index c4daa1232..5528f7b73 100644 --- a/scribus/ui/tabruler.cpp +++ b/scribus/ui/tabruler.cpp @@ -557,10 +557,19 @@ Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, const QListsetBuddy(tabFillCombo); layout1->addWidget( tabFillComboT ); layout1->addWidget( tabFillCombo ); - - layout4 = new QHBoxLayout; - layout4->setContentsMargins(0, 0, 0, 0); - layout4->setSpacing(6); + clearOneButton = new QPushButton( this ); + clearOneButton->setText(""); + clearOneButton->setIcon(IconManager::instance().loadIcon("16/edit-delete.png")); + clearOneButton->setMinimumSize(24, 24); + clearOneButton->setMaximumSize(24, 24); + layout1->addSpacing(12); + layout1->addWidget(clearOneButton); + clearButton = new QPushButton( this ); + clearButton->setText(""); + clearButton->setIcon(IconManager::instance().loadIcon("16/edit-delete-all.png")); + clearButton->setMinimumSize(24, 24); + clearButton->setMaximumSize(24, 24); + layout1->addWidget(clearButton); indentLayout = new QHBoxLayout; indentLayout->setContentsMargins(0, 0, 0, 0); @@ -579,9 +588,8 @@ Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, const QListsetText(""); leftIndentLabel->setPixmap(IconManager::instance().loadPixmap("leftindent.png")); - layout4->addWidget( leftIndentLabel ); - layout4->addWidget( leftIndentData ); - layout4->addStretch(10); + indentLayout->addWidget(leftIndentLabel); + indentLayout->addWidget(leftIndentData); rightIndentLabel = new QLabel(this); rightIndentLabel->setText(""); rightIndentLabel->setPixmap(IconManager::instance().loadPixmap("rightindent.png")); @@ -590,14 +598,6 @@ Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, const QListaddWidget(rightIndentLabel); indentLayout->addWidget(rightIndentData); } - clearButton = new QPushButton( this ); - clearButton->setText( tr( "Delete All" ) ); - indentLayout->addSpacing(20); - indentLayout->addWidget( clearButton); - clearOneButton = new QPushButton( this ); - clearOneButton->setText( tr( "Delete Selected" ) ); - indentLayout->addWidget( clearOneButton); - indentLayout->addStretch(10); if (!haveFirst) { QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); @@ -609,7 +609,6 @@ Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, const QListaddLayout( layout2 ); indentLayout->addStretch( 10 ); tabrulerLayout->addLayout( indentLayout ); - tabrulerLayout->addLayout(layout4); tabData->setEnabled(false); tabFillCombo->setEnabled(false); @@ -701,9 +700,13 @@ void Tabruler::iconSetChange() if (leftIndentLabel) leftIndentLabel->setPixmap(iconManager.loadPixmap("leftindent.png")); - + if (rightIndentLabel) rightIndentLabel->setPixmap(iconManager.loadPixmap("rightindent.png")); + + clearOneButton->setIcon(iconManager.loadIcon("16/edit-delete.png")); + clearButton->setIcon(iconManager.loadIcon("16/edit-delete-all.png")); + } void Tabruler::languageChange() diff --git a/scribus/ui/tabruler.h b/scribus/ui/tabruler.h index 0251bbb19..7c5b3d460 100644 --- a/scribus/ui/tabruler.h +++ b/scribus/ui/tabruler.h @@ -142,8 +142,6 @@ protected: QHBoxLayout* layout2 { nullptr }; QHBoxLayout* layout1 { nullptr }; QHBoxLayout* indentLayout { nullptr }; -// QVBoxLayout* layout3 { nullptr }; - QHBoxLayout* layout4 { nullptr }; QComboBox* typeCombo { nullptr }; QComboBox* tabFillCombo { nullptr }; QLabel* tabFillComboT { nullptr }; -- 2.27.0