r24583 by jghali - #16527: Refactor and cleanup aligndistribute:ui <bubu>
scribus-commit
scribus-commit at lists.scribus.net
Tue Mar 23 20:56:03 UTC 2021
Author: jghali
Date: Tue Mar 23 20:56:03 2021
New Revision: 24583
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24583
Log:
#16527: Refactor and cleanup aligndistribute:ui <bubu>
Modified:
trunk/Scribus/scribus/ui/aligndistribute.cpp
trunk/Scribus/scribus/ui/aligndistribute.ui
Modified: trunk/Scribus/scribus/ui/aligndistribute.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24583&path=/trunk/Scribus/scribus/ui/aligndistribute.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.cpp (original)
+++ trunk/Scribus/scribus/ui/aligndistribute.cpp Tue Mar 23 20:56:03 2021
@@ -55,19 +55,10 @@
setupUi(this);
setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
setObjectName(name);
-
- //hide spare controls
- toolButtonDummy1->hide();
- toolButtonDummy2->hide();
//set up scrspinboxes
distributeDistSpinBox->setValues(-10000.0, 10000.0, 2, 0.0);
- // buddies
- alignRelativeToLabel->setBuddy( alignRelativeToCombo );
- alignGuideLabel->setBuddy( alignGuideLineEdit );
- distributeDistLabel->setBuddy( distributeDistSpinBox );
-
resize( QSize(100, 100).expandedTo(minimumSizeHint()) );
languageChange();
init();
@@ -232,71 +223,6 @@
swapLeftToolButton->setIcon(im.loadIcon("22/swap-left.png"));
swapRightToolButton->setIcon(im.loadIcon("22/swap-right.png"));
-
- QSize s(24,24);
- alignLeftOutToolButton->setMinimumSize(s);
- alignLeftInToolButton->setMinimumSize(s);
- alignCenterHorToolButton->setMinimumSize(s);
- alignRightInToolButton->setMinimumSize(s);
- alignRightOutToolButton->setMinimumSize(s);
-
- alignTopOutToolButton->setMinimumSize(s);
- alignTopInToolButton->setMinimumSize(s);
- alignCenterVerToolButton->setMinimumSize(s);
- alignBottomInToolButton->setMinimumSize(s);
- alignBottomOutToolButton->setMinimumSize(s);
-
- distributeLeftToolButton->setMinimumSize(s);
- distributeCenterHToolButton->setMinimumSize(s);
- distributeRightToolButton->setMinimumSize(s);
- distributeDistHToolButton->setMinimumSize(s);
-
- distributeBottomToolButton->setMinimumSize(s);
- distributeCenterVToolButton->setMinimumSize(s);
- distributeTopToolButton->setMinimumSize(s);
- distributeDistVToolButton->setMinimumSize(s);
-
- distributeAcrossPageToolButton->setMinimumSize(s);
- distributeDownPageToolButton->setMinimumSize(s);
- distributeAcrossMarginsToolButton->setMinimumSize(s);
- distributeDownMarginsToolButton->setMinimumSize(s);
- distributeDistValueHToolButton->setMinimumSize(s);
- distributeDistValueVToolButton->setMinimumSize(s);
-
- swapLeftToolButton->setMinimumSize(s);
- swapRightToolButton->setMinimumSize(s);
-
- alignLeftOutToolButton->setMaximumSize(s);
- alignLeftInToolButton->setMaximumSize(s);
- alignCenterHorToolButton->setMaximumSize(s);
- alignRightInToolButton->setMaximumSize(s);
- alignRightOutToolButton->setMaximumSize(s);
-
- alignTopOutToolButton->setMaximumSize(s);
- alignTopInToolButton->setMaximumSize(s);
- alignCenterVerToolButton->setMaximumSize(s);
- alignBottomInToolButton->setMaximumSize(s);
- alignBottomOutToolButton->setMaximumSize(s);
-
- distributeLeftToolButton->setMaximumSize(s);
- distributeCenterHToolButton->setMaximumSize(s);
- distributeRightToolButton->setMaximumSize(s);
- distributeDistHToolButton->setMaximumSize(s);
-
- distributeBottomToolButton->setMaximumSize(s);
- distributeCenterVToolButton->setMaximumSize(s);
- distributeTopToolButton->setMaximumSize(s);
- distributeDistVToolButton->setMaximumSize(s);
-
- distributeAcrossPageToolButton->setMaximumSize(s);
- distributeDownPageToolButton->setMaximumSize(s);
- distributeAcrossMarginsToolButton->setMaximumSize(s);
- distributeDownMarginsToolButton->setMaximumSize(s);
- distributeDistValueHToolButton->setMaximumSize(s);
- distributeDistValueVToolButton->setMaximumSize(s);
-
- swapLeftToolButton->setMaximumSize(s);
- swapRightToolButton->setMaximumSize(s);
}
void AlignDistributePalette::unitChange()
Modified: trunk/Scribus/scribus/ui/aligndistribute.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24583&path=/trunk/Scribus/scribus/ui/aligndistribute.ui
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.ui (original)
+++ trunk/Scribus/scribus/ui/aligndistribute.ui Tue Mar 23 20:56:03 2021
@@ -168,6 +168,18 @@
<layout class="QGridLayout" name="_5">
<item row="1" column="3">
<widget class="QToolButton" name="alignBottomInToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -178,6 +190,18 @@
</item>
<item row="1" column="1">
<widget class="QToolButton" name="alignTopInToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -188,6 +212,18 @@
</item>
<item row="0" column="1">
<widget class="QToolButton" name="alignLeftInToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -198,6 +234,18 @@
</item>
<item row="0" column="3">
<widget class="QToolButton" name="alignRightInToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -208,6 +256,18 @@
</item>
<item row="1" column="4">
<widget class="QToolButton" name="alignBottomOutToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -218,6 +278,18 @@
</item>
<item row="1" column="0">
<widget class="QToolButton" name="alignTopOutToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -228,6 +300,18 @@
</item>
<item row="1" column="2">
<widget class="QToolButton" name="alignCenterVerToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -238,6 +322,18 @@
</item>
<item row="0" column="0">
<widget class="QToolButton" name="alignLeftOutToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -248,6 +344,18 @@
</item>
<item row="0" column="4">
<widget class="QToolButton" name="alignRightOutToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -258,6 +366,18 @@
</item>
<item row="0" column="2">
<widget class="QToolButton" name="alignCenterHorToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -349,6 +469,18 @@
<layout class="QGridLayout" name="_7">
<item row="0" column="3">
<widget class="QToolButton" name="distributeDistHToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -359,6 +491,18 @@
</item>
<item row="1" column="2">
<widget class="QToolButton" name="distributeTopToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -369,6 +513,18 @@
</item>
<item row="1" column="1">
<widget class="QToolButton" name="distributeCenterVToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -379,16 +535,18 @@
</item>
<item row="0" column="2">
<widget class="QToolButton" name="distributeRightToolButton">
- <property name="iconSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QToolButton" name="toolButtonDummy1">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -402,6 +560,18 @@
<property name="enabled">
<bool>true</bool>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -412,6 +582,18 @@
</item>
<item row="0" column="0">
<widget class="QToolButton" name="distributeLeftToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -425,6 +607,18 @@
<property name="enabled">
<bool>true</bool>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -435,6 +629,18 @@
</item>
<item row="3" column="1">
<widget class="QToolButton" name="distributeDistValueHToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -448,6 +654,18 @@
<property name="enabled">
<bool>true</bool>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -458,16 +676,18 @@
</item>
<item row="0" column="1">
<widget class="QToolButton" name="distributeCenterHToolButton">
- <property name="iconSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QToolButton" name="toolButtonDummy2">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -481,6 +701,18 @@
<property name="enabled">
<bool>true</bool>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -491,6 +723,18 @@
</item>
<item row="3" column="2">
<widget class="QToolButton" name="distributeDistValueVToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -501,6 +745,18 @@
</item>
<item row="1" column="3">
<widget class="QToolButton" name="distributeDistVToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -511,6 +767,18 @@
</item>
<item row="1" column="0">
<widget class="QToolButton" name="distributeBottomToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -712,6 +980,18 @@
</item>
<item>
<widget class="QToolButton" name="swapLeftToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -722,6 +1002,18 @@
</item>
<item>
<widget class="QToolButton" name="swapRightToolButton">
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="iconSize">
<size>
<width>22</width>
@@ -804,10 +1096,8 @@
<tabstop>distributeDownPageToolButton</tabstop>
<tabstop>distributeAcrossMarginsToolButton</tabstop>
<tabstop>distributeDownMarginsToolButton</tabstop>
- <tabstop>toolButtonDummy1</tabstop>
<tabstop>distributeDistValueHToolButton</tabstop>
<tabstop>distributeDistValueVToolButton</tabstop>
- <tabstop>toolButtonDummy2</tabstop>
<tabstop>distributeDistSpinBox</tabstop>
<tabstop>reverseDistributionCheckBox</tabstop>
<tabstop>swapLeftToolButton</tabstop>
More information about the scribus-commit
mailing list