View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017393 | Scribus | User Interface | public | 2025-01-30 08:04 | 2025-02-02 19:50 |
Reporter | ale | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | new | Resolution | open | ||
Product Version | 1.7.1.svn | ||||
Summary | 0017393: [PATCH] Make the Align and distribute tool more comfortable to use | ||||
Description | TLDR: "Relative to", "Selected guide", and "Align sides" by should be three groups of tool buttons in a single row. With informational labels below them. No tabs, one panel with sections likes in the PP kerneling's counting of the clicks is a bit off, but it's not completely wrong: https://forums.scribus.net/index.php/topic,5859.msg25433.html#msg25433 we can do better! first, if there are not new feature waiting to get into the tool, we can remove the tabs: align, distribute, and snap on top of each other using the same type of expanding sections like in the PP and CP. put the labels ("Relative to:", "Selected guide", ...) below the buttons and hide them when the informational labels are not shown. (remove the accelerators from the labels: in my setup, only the alt+s for "selected guide" seems to work anyway) use tool buttons instead of dropdowns. (we need icons...) "Selected guide" could also be a button that changes state when a guide is selected. it might show an "animation" each time a guide gets selected: it's light gray when no guides is selected, dark gray when selected, and fades from light gray to dark gray each time a guide is selected. the coordinates of the selected guide can be in the tooltip. Some of the tooltips need to be redone to carry real information. @jghali @mrb : are you ok with such a change? @nitramr : do you want to do this? should i do it? | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
@ale feel free to take it. I'm currently still busy with the node editing improvements. Other topics on my list are the "custom toolbar / context toolbar" and "apply properties to all selected items" in PP. In settings window there are some UI inconsistencies too. So, I have already some to-dos :) BTW: I found a 3 years old mockup about the alignment and distribution palette. It is very close to your description. |
|
Note to self: we don't need a separate button for the guide being selected. We can apply the effect to the button for aligning to the guide. |
|
oh! the the ten buttons on one line do not really make the widget wider... i wonder what is better, when one wants to reach the right one... |
|
I'll present the task at this evening Hackergarten (https://www.meetup.com/hackergarten-zurich/events/305130435/): - Use the Image content palette as a reference - Use sections instead of tabs - Use tool buttons instead of drop downs - Use informational labels - Add the "fade" effect on the "align to guide" tool button. - (Design new icons for the tool buttons) |
|
so, we worked on the align and distribute tool and, in at designer it now looks just as good as the image panel of the content properties. the problem is that, then, the image panel looks correct in scribus but our .ui file is displayed just like in designer. @nitramr : during the weekend, would you have time for teaching me how to use the new folding widget? |
|
@ale did you compiled the SectionContainer widget as designer plugin? In main folder you can find the ScribusDesignerPlugins.pro file 1. Just compile the project as library 2. copy the library in Qt designer plugin folder. For me, it this path: Qt/Tools/QtCreator/lib/Qt/plugins/designer 3. restart qt designer The used Qt version to compile the plugin should <= the version used to compile Qt designer The plugin contains the SectionContainer Widget and FormWidget. If everything is correct, it should look like this. |
|
ok, no! i'm for sure missing the plugin! i will install it. we compared the the xml in the .ui and somehow managed to get something to work... the current state is here: https://gitlab.com/a.l.e/scribus/-/tree/align-and-distribute?ref_type=heads but, before you look at it, i need to add the plugin to the qt designer and check if everything is ok in the .ui file. |
|
Too late, I already looked at it. :D So, the ui files looks correct in designer. At the bottom of the screenshot, you see the compiled palette in Scribus. It looks broken, but after I saved the ui file again it looks correct in Scribus too. |
|
ok, now both show up ok in designer. do you have any hint why in Scribus everything is still on the same line? : - ) |
|
You can try to save the ui file in designer again. Looks like the geometry property of both page widgets occurs the issue. On the left side you can see the file from GitLab, on the right side the file I just saved again in designer without changes. |
|
oh yeah! i've made a small change in the .ui, saved it, compiled and now it shows ok in scribus, too. perfect. during the weekend i will be able to continue my work on it! thanks for your support! |
|
|
|
Great. I should describe using the Designer plugin somewhere. I don't know if you've seen it, but the UI widgets in the Designer also have properties that you can easily change directly there. Let me know if you need new icons. |
|
i've put my notes in here: https://github.com/aoloe/scribus-manual-development/blob/master/content/qt-designer/NOTES.md one day i should take some time to make most of my small manuals a bit more coherent and setup a workflow to create html / epub out of them.... |
|
voilĂ , with the qt designer plugin installed, working with the new scribus widgets is much more pleasant (it's still a bit quirky... but that's on designer!) it's my first experience with the new widgets introduced by martin, and i have to say: they make it "easy" to create pleasant UIs! i attach the intermediate result. with and without informational labels. what is missing: add a (decent) "color animation" on the "align by guide" button, when it is active and a guide is clicked (the coordinates now being in the tooltip of the button itself). if needed, we can make it more "vertically" compact by merging some rows, @nitramr : - any hint on how i can introduce a small gap in the first line, between the Reference and Mode "groups"? - i'd need nine new icons and/or instructions on how to add (temporary) new svg icons - the five align relative to checkable buttons: - first selected - last selected - page - margins - guide - selection - the two checkable align modes: - move - resize - "reverse distribution" in "by distance" (also checkable) |
|
voilĂ : a patch. - the tabs are moved to expandable sections - the comboboxes are now groups of toolbuttons - when the "relative to guide" option is checked, the button pulses when selecting the guide (the coordinates are then in the tooltip) - the icons for the "new" buttons are missing. if martin can't provide them, i can provide a (temporary) set (i'm for slower than him in creating them, but i should be able to come up with something "usable"...). align-and-distribute-into-sections.diff (72,429 bytes)
From 656df5ad3a7573abce175b22b4849b9316254851 Mon Sep 17 00:00:00 2001 From: ale rimoldi <ale@graphicslab.org> Date: Sun, 2 Feb 2025 14:38:38 +0100 Subject: align and distribute: use toolbuttons instead of combobox and merge the tabs into sections diff --git a/scribus/CMakeLists_Sources.txt b/scribus/CMakeLists_Sources.txt index 7b59202c4..4ba985604 100644 --- a/scribus/CMakeLists_Sources.txt +++ b/scribus/CMakeLists_Sources.txt @@ -573,6 +573,7 @@ set(SCRIBUS_SOURCES ui/widgets/pagesizepreview.cpp ui/widgets/pagesizeselector.cpp ui/widgets/popup_menu.cpp + ui/widgets/pulsing_toolbutton.cpp ui/widgets/section_container.cpp ui/widgets/stacked_container.cpp ui/widgets/switch.cpp diff --git a/scribus/ui/aligndistribute.cpp b/scribus/ui/aligndistribute.cpp index b0b057743..8e05385aa 100644 --- a/scribus/ui/aligndistribute.cpp +++ b/scribus/ui/aligndistribute.cpp @@ -22,6 +22,7 @@ for which a new license (GPL+exception) is in place. #include "aligndistribute.h" #include <QComboBox> +#include <QButtonGroup> #include <QEvent> #include <QImage> #include <QLabel> @@ -78,6 +79,21 @@ AlignDistributePalette::AlignDistributePalette(QWidget* parent) : DockPanelBase( //set up scrspinboxes ad->distributeDistSpinBox->setValues(-10000.0, 10000.0, 2, 0.0); + groupReference = new QButtonGroup(); + + groupReference->addButton(ad->buttonReferenceFirst, 0); + groupReference->addButton(ad->buttonReferenceLast, 1); + groupReference->addButton(ad->buttonReferencePage, 2); + groupReference->addButton(ad->buttonReferenceMargins, 3); + groupReference->addButton(ad->buttonReferenceGuide, 4); + groupReference->addButton(ad->buttonReferenceSelection, 5); + ad->buttonReferenceFirst->setChecked(true); + + groupMode = new QButtonGroup(); + groupMode->addButton(ad->buttonModeMove, 0); + groupMode->addButton(ad->buttonModeResize, 1); + ad->buttonModeMove->setChecked(true); + resize( QSize(100, 100).expandedTo(minimumSizeHint()) ); languageChange(); init(); @@ -85,6 +101,7 @@ AlignDistributePalette::AlignDistributePalette(QWidget* parent) : DockPanelBase( connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(iconSetChange())); connect(ScQApp, SIGNAL(localeChanged()), this, SLOT(localeChange())); + connect(ScQApp, SIGNAL(labelVisibilityChanged(bool)), this, SLOT(toggleLabelVisibility(bool))); } void AlignDistributePalette::changeEvent(QEvent *e) @@ -101,26 +118,18 @@ void AlignDistributePalette::languageChange() { ad->retranslateUi(this); - int alignComboValue = ad->alignRelativeToCombo->currentIndex(); - ad->alignRelativeToCombo->clear(); - ad->alignRelativeToCombo->addItem( tr( "First Selected" ) ); - ad->alignRelativeToCombo->addItem( tr( "Last Selected" ) ); - ad->alignRelativeToCombo->addItem( tr( "Page" ) ); - ad->alignRelativeToCombo->addItem( tr( "Margins" ) ); - ad->alignRelativeToCombo->addItem( tr( "Guide" ) ); - ad->alignRelativeToCombo->addItem( tr( "Selection" ) ); - ad->alignRelativeToCombo->setCurrentIndex(alignComboValue); - ad->alignRelativeToCombo->setToolTip( tr( "<qt>Align relative to the:<ul><li>First selected item</li><li>Second Selected Item</li><li>The current page</li><li>The margins of the current page</li><li>A Guide</li><li>The selection</ul></qt>" ) ); - alignToChanged(alignComboValue); - - int alignMethodValue = ad->alignMoveOrResizeCombo->currentIndex(); - ad->alignMoveOrResizeCombo->clear(); - ad->alignMoveOrResizeCombo->addItem( tr("Move") ); - ad->alignMoveOrResizeCombo->addItem( tr("Resize") ); - ad->alignMoveOrResizeCombo->setToolTip( tr( "<qt>When aligning one side of an item do one of the following:<ul><li>Always move the other side too (preserve existing width and height)</li><li>Keep the other side fixed (resize the item instead of moving it) whenever possible</li></ul></qt>" )); - alignMethodChanged(alignMethodValue); - - ad->alignGuideLineEdit->setToolTip( tr( "The location of the selected guide to align to" ) ); + referenceGuideTooltipTemplate = tr("Align relative to a guide%1"); + + ad->buttonReferenceFirst->setToolTip(tr("Align relative to the first selected item")); + ad->buttonReferenceLast->setToolTip(tr("Align relative to the last selected item")); + ad->buttonReferencePage->setToolTip(tr("Align relative to the current page")); + ad->buttonReferenceMargins->setToolTip(tr("Align relative to the margins of the current page")); + ad->buttonReferenceGuide->setToolTip(referenceGuideTooltipTemplate); + ad->buttonReferenceSelection->setToolTip(tr("Align relative the selection")); + + ad->buttonModeMove->setToolTip(tr("When aligning one side of an item, always move the other side too (preserve existing width and height)")); + ad->buttonModeResize->setToolTip(tr("When aligning one side of an item, whenever possible keep the other side fixed (resize the item instead of moving it)")); + ad->alignLeftOutToolButton->setToolTip( tr( "Align right sides of items to left side of anchor" ) ); ad->alignRightOutToolButton->setToolTip( tr( "Align left sides of items to right side of anchor" ) ); ad->alignBottomInToolButton->setToolTip( tr( "Align bottoms" ) ); @@ -149,20 +158,33 @@ void AlignDistributePalette::languageChange() ad->distributeDownMarginsToolButton->setToolTip( tr( "Make vertical gaps between items and the top and bottom of page margins equal" ) ); ad->distributeDistSpinBox->setToolTip( tr( "Distribute the items with the distance specified" ) ); - ad->reverseDistributionCheckBox->setToolTip( tr("When distributing by a set distance, reverse the direction of the distribution of items") ); - - guideInfoTextNone = tr("None Selected"); + ad->reverseDistributionButton->setToolTip( tr("When distributing by a set distance, reverse the direction of the distribution of items") ); ad->swapLeftToolButton->setToolTip( tr( "Swap items to the left" ) ); ad->swapRightToolButton->setToolTip( tr( "Swap items to the right" ) ); } +void AlignDistributePalette::toggleLabelVisibility(bool v) +{ + ad->alignReferenceLabel->setLabelVisibility(v); + ad->alignModeLabel->setLabelVisibility(v); + ad->alignHorizontalLabel->setLabelVisibility(v); + ad->alignVerticalLabel->setLabelVisibility(v); + ad->swapLabel->setLabelVisibility(v); + ad->distributeHorizontalLabel->setLabelVisibility(v); + ad->distributeVerticalLabel->setLabelVisibility(v); + ad->distributeByGapLabel->setLabelVisibility(v); + ad->distributeByDistanceLabel->setLabelVisibility(v); +} + void AlignDistributePalette::init() { undoManager = UndoManager::instance(); iconSetChange(); + connect(groupReference, &QButtonGroup::idClicked, this, &AlignDistributePalette::alignToChanged); + connect(groupMode, &QButtonGroup::idClicked, this, &AlignDistributePalette::alignMethodChanged); connect(ad->alignLeftOutToolButton, SIGNAL(clicked()), this, SLOT(alignLeftOut())); connect(ad->alignRightOutToolButton, SIGNAL(clicked()), this, SLOT(alignRightOut())); connect(ad->alignBottomInToolButton, SIGNAL(clicked()), this, SLOT(alignBottomIn())); @@ -190,17 +212,11 @@ void AlignDistributePalette::init() connect(ad->swapLeftToolButton, SIGNAL(clicked()), this, SLOT(swapLeft())); connect(ad->swapRightToolButton, SIGNAL(clicked()), this, SLOT(swapRight())); - ad->alignRelativeToCombo->setCurrentIndex(0); alignToChanged(0); alignMethodChanged(0); - connect(ad->alignRelativeToCombo, SIGNAL(activated(int)), this, SLOT(alignToChanged(int))); - connect(ad->alignMoveOrResizeCombo, SIGNAL(activated(int)), this, SLOT(alignMethodChanged(int))); unitRatio = 1.0; guideDirection = -1; - - guideInfoText = guideInfoTextNone; - ad->alignGuideLineEdit->setText(guideInfoTextNone); } void AlignDistributePalette::iconSetChange() @@ -342,7 +358,7 @@ void AlignDistributePalette::distributeRight() void AlignDistributePalette::distributeDistH(bool usingDistance) { if (currDoc != nullptr) - currDoc->itemSelection_DistributeDistH(usingDistance, ad->distributeDistSpinBox->value(), ad->reverseDistributionCheckBox->isChecked()); + currDoc->itemSelection_DistributeDistH(usingDistance, ad->distributeDistSpinBox->value(), ad->reverseDistributionButton->isChecked()); } void AlignDistributePalette::distributeDistValH() @@ -397,7 +413,7 @@ void AlignDistributePalette::distributeTop() void AlignDistributePalette::distributeDistV(bool usingDistance) { if (currDoc != nullptr) - currDoc->itemSelection_DistributeDistV(usingDistance, ad->distributeDistSpinBox->value(), ad->reverseDistributionCheckBox->isChecked()); + currDoc->itemSelection_DistributeDistV(usingDistance, ad->distributeDistSpinBox->value(), ad->reverseDistributionButton->isChecked()); } void AlignDistributePalette::distributeDistValV() @@ -432,10 +448,9 @@ void AlignDistributePalette::alignMethodChanged(int newAlignMethod) void AlignDistributePalette::setGuide(int direction, qreal position) { - //direction 0 = H, 1 = V -// qDebug() << "AlignDistributePalette::setGuide(" << direction << "" << position << ")"; guideDirection = direction; guidePosition = position; + ad->buttonReferenceGuide->animatePulsing(); enableGuideButtons(); } @@ -449,6 +464,7 @@ void AlignDistributePalette::localeChange() void AlignDistributePalette::enableGuideButtons() { QString suffix; + QString guidePositionText; double unitRatio = 1.0; int precision = 1; if (currDoc != nullptr) @@ -462,17 +478,16 @@ void AlignDistributePalette::enableGuideButtons() switch (guideDirection) { case -1: - guideInfoText = guideInfoTextNone; if (currAlignTo == ScribusDoc::alignGuide) setterH = setterV = false; break; case 0: - guideInfoText = tr("Y: %1%2").arg(guidePosition * unitRatio, 0, 'f', precision).arg(suffix); + guidePositionText = tr(": Y: %1%2").arg(guidePosition * unitRatio, 0, 'f', precision).arg(suffix); if (currAlignTo == ScribusDoc::alignGuide) setterV = false; break; case 1: - guideInfoText = tr("X: %1%2").arg(guidePosition * unitRatio, 0, 'f', precision).arg(suffix); + guidePositionText = tr(": X: %1%2").arg(guidePosition * unitRatio, 0, 'f', precision).arg(suffix); if (currAlignTo == ScribusDoc::alignGuide) setterH = false; break; @@ -493,6 +508,6 @@ void AlignDistributePalette::enableGuideButtons() ad->alignBottomOutToolButton->setEnabled(setterO); ad->alignCenterVerToolButton->setEnabled(setterH); - ad->alignGuideLineEdit->setText(guideInfoText); + ad->buttonReferenceGuide->setToolTip(referenceGuideTooltipTemplate.arg(guidePositionText == "" ? "" : guidePositionText)); } diff --git a/scribus/ui/aligndistribute.h b/scribus/ui/aligndistribute.h index 0b7934f2c..96f6ace9e 100644 --- a/scribus/ui/aligndistribute.h +++ b/scribus/ui/aligndistribute.h @@ -76,10 +76,13 @@ public: public slots: void setGuide(int, qreal); void localeChange(); + void toggleLabelVisibility(bool v); protected: ScribusView *currView { nullptr }; AlignDistribute * ad {nullptr}; + QButtonGroup* groupReference; + QButtonGroup* groupMode; // UserActionSniffer *userActionSniffer; // void installSniffer(ScrSpinBox *spinBox); @@ -133,8 +136,7 @@ private: qreal unitRatio { 1.0 }; int guideDirection { -1 }; qreal guidePosition { 0.0 }; - QString guideInfoText; - QString guideInfoTextNone; + QString referenceGuideTooltipTemplate; signals: void documentChanged(); diff --git a/scribus/ui/aligndistribute.ui b/scribus/ui/aligndistribute.ui index dcb3273a5..31eb4b9da 100644 --- a/scribus/ui/aligndistribute.ui +++ b/scribus/ui/aligndistribute.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>247</width> - <height>456</height> + <width>308</width> + <height>567</height> </rect> </property> <property name="windowTitle"> @@ -27,19 +27,11 @@ <number>3</number> </property> <item> - <widget class="SectionContainer" name="sectionAlign" native="true"> + <widget class="SectionContainer" name="sectionAlign"> <property name="title" stdset="0"> <string>Align</string> </property> <widget class="QWidget" name="page"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>282</width> - <height>107</height> - </rect> - </property> <layout class="QVBoxLayout" name="verticalLayout_4"> <property name="leftMargin"> <number>8</number> @@ -54,243 +46,477 @@ <number>8</number> </property> <item> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="QLineEdit" name="alignGuideLineEdit"/> - </item> - <item> - <widget class="QComboBox" name="alignRelativeToCombo"/> - </item> - <item> - <widget class="QComboBox" name="alignMoveOrResizeCombo"/> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_4"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="alignReferenceLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>Reference</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_13"> + <item> + <widget class="QToolButton" name="buttonReferenceFirst"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="buttonReferenceLast"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="buttonReferencePage"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="buttonReferenceMargins"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="PulsingToolButton" name="buttonReferenceGuide"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="buttonReferenceSelection"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="alignModeLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>Mode</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_12"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_14"> + <item> + <widget class="QToolButton" name="buttonModeMove"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="buttonModeResize"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <widget class="QToolButton" name="alignLeftInToolButton"> - <property name="minimumSize"> - <size> - <width>24</width> - <height>24</height> - </size> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - <property name="maximumSize"> + <property name="sizeHint" stdset="0"> <size> - <width>24</width> - <height>24</height> + <width>40</width> + <height>20</height> </size> </property> - <property name="iconSize"> - <size> - <width>22</width> - <height>22</height> - </size> - </property> - </widget> - </item> - <item> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> - <item> - <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> - <height>22</height> - </size> - </property> - </widget> + </spacer> </item> </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_5"> + <layout class="QHBoxLayout" name="horizontalLayout_18"> <item> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> - <item> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="alignHorizontalLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>Horizontal</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_15"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <widget class="QToolButton" name="alignTopInToolButton"> - <property name="minimumSize"> - <size> - <width>24</width> - <height>24</height> - </size> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - <property name="maximumSize"> + <property name="sizeHint" stdset="0"> <size> - <width>24</width> - <height>24</height> + <width>40</width> + <height>20</height> </size> </property> - <property name="iconSize"> - <size> - <width>22</width> - <height>22</height> - </size> - </property> - </widget> + </spacer> </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_19"> <item> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="alignVerticalLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>Vertical</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_16"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <widget class="QToolButton" name="alignBottomOutToolButton"> - <property name="minimumSize"> - <size> - <width>24</width> - <height>24</height> - </size> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - <property name="maximumSize"> + <property name="sizeHint" stdset="0"> <size> - <width>24</width> - <height>24</height> + <width>40</width> + <height>20</height> </size> </property> - <property name="iconSize"> - <size> - <width>22</width> - <height>22</height> - </size> - </property> - </widget> + </spacer> </item> </layout> </item> @@ -299,19 +525,11 @@ </widget> </item> <item> - <widget class="SectionContainer" name="sectionDistribute" native="true"> + <widget class="SectionContainer" name="sectionDistribute"> <property name="title" stdset="0"> <string>Distribute</string> </property> <widget class="QWidget" name="page_2"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>176</width> - <height>233</height> - </rect> - </property> <layout class="QVBoxLayout" name="verticalLayout_7"> <property name="leftMargin"> <number>8</number> @@ -326,417 +544,629 @@ <number>8</number> </property> <item> - <layout class="QHBoxLayout" name="horizontalLayout_9"> + <layout class="QHBoxLayout" name="horizontalLayout_24"> <item> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="distributeHorizontalLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>Horizontal</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_21"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="distributeRightToolButton"> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="distributeCenterHToolButton"> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <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> + <spacer name="horizontalSpacer_6"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - <property name="iconSize"> + <property name="sizeHint" stdset="0"> <size> - <width>22</width> - <height>22</height> + <width>40</width> + <height>20</height> </size> </property> - </widget> + </spacer> </item> </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <item> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="distributeRightToolButton"> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> + <layout class="QHBoxLayout" name="horizontalLayout_25"> <item> - <widget class="QToolButton" name="distributeCenterHToolButton"> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="distributeVerticalLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>Vertical</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_22"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <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> + <spacer name="horizontalSpacer_7"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - <property name="iconSize"> + <property name="sizeHint" stdset="0"> <size> - <width>22</width> - <height>22</height> + <width>40</width> + <height>20</height> </size> </property> - </widget> + </spacer> </item> </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_7"> + <layout class="QHBoxLayout" name="horizontalLayout_26"> <item> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="distributeByGapLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>By gap</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_23"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <widget class="QToolButton" name="distributeDownPageToolButton"> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="distributeAcrossPageToolButton"> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="distributeDownMarginsToolButton"> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="distributeAcrossMarginsToolButton"> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <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> + <spacer name="horizontalSpacer_8"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - <property name="iconSize"> + <property name="sizeHint" stdset="0"> <size> - <width>22</width> - <height>22</height> + <width>40</width> + <height>20</height> </size> </property> - </widget> - </item> - <item> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> - <item> - <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> - <height>22</height> - </size> - </property> - </widget> + </spacer> </item> </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <item> - <widget class="QToolButton" name="distributeDownPageToolButton"> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="distributeAcrossPageToolButton"> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> + <layout class="QHBoxLayout" name="horizontalLayout_10"> <item> - <widget class="QToolButton" name="distributeDownMarginsToolButton"> - <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="distributeByDistanceLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>By distance</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_20"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <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> + <height>22</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="ScrSpinBox" name="distributeDistSpinBox"> + <property name="minimumSize"> + <size> + <width>50</width> + <height>24</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="reverseDistributionButton"> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> - <widget class="QToolButton" name="distributeAcrossMarginsToolButton"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="minimumSize"> - <size> - <width>24</width> - <height>24</height> - </size> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - <property name="maximumSize"> + <property name="sizeHint" stdset="0"> <size> - <width>24</width> - <height>24</height> + <width>40</width> + <height>20</height> </size> </property> - <property name="iconSize"> - <size> - <width>22</width> - <height>22</height> - </size> - </property> - </widget> + </spacer> </item> </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_11"> - <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> - <height>22</height> - </size> - </property> - </widget> - </item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> <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> - <height>22</height> - </size> - </property> + <widget class="FormWidget" name="swapLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="label" stdset="0"> + <string>Swap</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_17"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_11"> + <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> + <height>22</height> + </size> + </property> + </widget> + </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> + <height>22</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_10"> <item> - <widget class="QCheckBox" name="checkBoxAlignSpacing"> - <property name="text"> - <string>Use Spacing</string> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Orientation::Horizontal</enum> </property> - </widget> - </item> - <item> - <widget class="ScrSpinBox" name="distributeDistSpinBox"> - <property name="minimumSize"> + <property name="sizeHint" stdset="0"> <size> - <width>50</width> - <height>24</height> + <width>40</width> + <height>20</height> </size> </property> - </widget> + </spacer> </item> </layout> </item> - <item> - <widget class="QCheckBox" name="reverseDistributionCheckBox"> - <property name="text"> - <string>Reverse Distribution</string> - </property> - </widget> - </item> </layout> </widget> </widget> @@ -758,16 +1188,28 @@ </widget> <customwidgets> <customwidget> - <class>ScrSpinBox</class> - <extends>QDoubleSpinBox</extends> - <header>ui/scrspinbox.h</header> + <class>FormWidget</class> + <extends>QWidget</extends> + <header>ui/widgets/form_widget.h</header> + <container>1</container> </customwidget> <customwidget> <class>SectionContainer</class> <extends>QWidget</extends> <header>ui/widgets/section_container.h</header> + <addpagemethod>setWidget</addpagemethod> <container>1</container> </customwidget> + <customwidget> + <class>ScrSpinBox</class> + <extends>QDoubleSpinBox</extends> + <header>ui/scrspinbox.h</header> + </customwidget> + <customwidget> + <class>PulsingToolButton</class> + <extends>QToolButton</extends> + <header>ui/widgets/pulsing_toolbutton.h</header> + </customwidget> </customwidgets> <includes> <include location="local">ui/scrspinbox.h</include> diff --git a/scribus/ui/widgets/pulsing_toolbutton.cpp b/scribus/ui/widgets/pulsing_toolbutton.cpp new file mode 100644 index 000000000..106ffc8b0 --- /dev/null +++ b/scribus/ui/widgets/pulsing_toolbutton.cpp @@ -0,0 +1,79 @@ +#include "pulsing_toolbutton.h" + +#include <QBrush> +#include <QColor> +#include <QPaintEvent> +#include <QPalette> +#include <QStyle> +#include <QStyleOptionButton> +#include <QStylePainter> +#include <QString> +#include <QToolButton> +#include <QVariant> +#include <QVariantAnimation> +#include <QWidget> + +PulsingToolButton::PulsingToolButton(QWidget *parent): + QToolButton(parent), + m_transition(nullptr) +{ +} + +void PulsingToolButton::paintEvent(QPaintEvent* event) +{ + if (m_transition == nullptr) + { + QToolButton::paintEvent(event); + } + else + { + QStylePainter p(this); + QStyleOptionToolButton opt; + initStyleOption(&opt); + p.drawComplexControl(QStyle::CC_ToolButton, opt); + + m_currentColor.setAlpha(100); + p.setBrush(m_currentColor); + p.setPen(Qt::NoPen); + p.drawRect(0,0,width(),height()); + } +} + +// https://stackoverflow.com/questions/53084981/how-to-add-a-hover-transition-to-qpushbutton +// https://forum.qt.io/post/538500 +void PulsingToolButton::animatePulsing() +{ + if (!isChecked()) + { + return; + } + if (m_transition != nullptr) + { + // too fast, don't show a second animation + return; + // m_transition->stop(); + } + + m_transition = new QVariantAnimation(this); + m_transition->setDuration(1000); // TODO: this should be a class const + + QColor startColor = palette().button().color(); + QColor endColor = palette().shadow().color(); + + m_transition->setStartValue(startColor); + m_transition->setEndValue(endColor); + + connect(m_transition, &QVariantAnimation::valueChanged, + this, [this](const QVariant &value){ + m_currentColor = value.value<QColor>(); + repaint(); + }); + + connect(m_transition, &QVariantAnimation::destroyed, + this, [this](){ + m_transition = nullptr; + repaint(); + }); + + m_transition->start(QAbstractAnimation::DeleteWhenStopped); +} diff --git a/scribus/ui/widgets/pulsing_toolbutton.h b/scribus/ui/widgets/pulsing_toolbutton.h new file mode 100644 index 000000000..c071fa483 --- /dev/null +++ b/scribus/ui/widgets/pulsing_toolbutton.h @@ -0,0 +1,40 @@ +#ifndef PULSING_TOOLBUTTON_H +#define PULSING_TOOLBUTTON_H + +/** + * Change the background color of the ToolButton to the opposite among checked and unchecked, + * then animate the transition back to the original color. + * Currently, done by draing a semitransparent rectangle on top of the button. + * + * In the future, the widget can be extend to pulse in a loop until mouseover, or other + * fancy gadgets. + * + * The current minimal implementation is tailored for the buttonReferenceGuide button in + * the align and distribute dialog: + * - It only pulses once. + * - It only pulses when it's checked. + * - The animation time is a constant. + */ + +#include <QColor> +#include <QToolButton> + +class QVariantAnimation; +class QWidget; + +class PulsingToolButton : public QToolButton +{ + Q_OBJECT +public: + explicit PulsingToolButton(QWidget *parent = nullptr); + void animatePulsing(); + +protected: + void paintEvent(QPaintEvent *) override; + +private: + QVariantAnimation *m_transition; + QColor m_currentColor; +}; + +#endif |
|
p.s.: i still need hints from martin, on how to add a gap between the two groups in the first row... |
|
@ale Here you can find information about the icon set and how to use it (just basic infos) https://wiki.scribus.net/canvas/IndigoDevelopment#SVG_based_Icon_System Here I write a small Style Guide for the UI. Basic too at the moment. https://wiki.scribus.net/canvas/IndigoUI_Style_Guide |
|
here is the .ui file, with the spacing set according to the specs. replaces the one in the diff. aligndistribute.ui (40,799 bytes)
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>AlignDistribute</class> <widget class="QWidget" name="AlignDistribute"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>308</width> <height>567</height> </rect> </property> <property name="windowTitle"> <string>Align and Distribute</string> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="SectionContainer" name="sectionAlign"> <property name="title" stdset="0"> <string>Align</string> </property> <widget class="QWidget" name="page"> <layout class="QVBoxLayout" name="verticalLayout_4"> <property name="leftMargin"> <number>8</number> </property> <property name="topMargin"> <number>8</number> </property> <property name="rightMargin"> <number>8</number> </property> <property name="bottomMargin"> <number>8</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_2"> <property name="spacing"> <number>16</number> </property> <item> <widget class="FormWidget" name="alignReferenceLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>Reference</string> </property> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_13"> <property name="spacing"> <number>4</number> </property> <item> <widget class="QToolButton" name="buttonReferenceFirst"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> <item> <widget class="QToolButton" name="buttonReferenceLast"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> <item> <widget class="QToolButton" name="buttonReferencePage"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> <item> <widget class="QToolButton" name="buttonReferenceMargins"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> <item> <widget class="PulsingToolButton" name="buttonReferenceGuide"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> <item> <widget class="QToolButton" name="buttonReferenceSelection"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <widget class="FormWidget" name="alignModeLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>Mode</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_12"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_14"> <property name="spacing"> <number>4</number> </property> <item> <widget class="QToolButton" name="buttonModeMove"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> <item> <widget class="QToolButton" name="buttonModeResize"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_18"> <item> <widget class="FormWidget" name="alignHorizontalLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>Horizontal</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_15"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_4"> <property name="spacing"> <number>4</number> </property> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer_2"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_19"> <item> <widget class="FormWidget" name="alignVerticalLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>Vertical</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_16"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_5"> <property name="spacing"> <number>4</number> </property> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer_3"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> </layout> </widget> </widget> </item> <item> <widget class="SectionContainer" name="sectionDistribute"> <property name="title" stdset="0"> <string>Distribute</string> </property> <widget class="QWidget" name="page_2"> <layout class="QVBoxLayout" name="verticalLayout_7"> <property name="spacing"> <number>8</number> </property> <property name="leftMargin"> <number>8</number> </property> <property name="topMargin"> <number>8</number> </property> <property name="rightMargin"> <number>8</number> </property> <property name="bottomMargin"> <number>8</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_24"> <item> <widget class="FormWidget" name="distributeHorizontalLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>Horizontal</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_21"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_6"> <property name="spacing"> <number>4</number> </property> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <widget class="QToolButton" name="distributeRightToolButton"> <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> <height>22</height> </size> </property> </widget> </item> <item> <widget class="QToolButton" name="distributeCenterHToolButton"> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer_6"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_25"> <item> <widget class="FormWidget" name="distributeVerticalLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>Vertical</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_22"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_7"> <property name="spacing"> <number>4</number> </property> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer_7"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_26"> <item> <widget class="FormWidget" name="distributeByGapLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>By gap</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_23"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_8"> <property name="spacing"> <number>4</number> </property> <item> <widget class="QToolButton" name="distributeDownPageToolButton"> <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> <height>22</height> </size> </property> </widget> </item> <item> <widget class="QToolButton" name="distributeAcrossPageToolButton"> <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> <height>22</height> </size> </property> </widget> </item> <item> <widget class="QToolButton" name="distributeDownMarginsToolButton"> <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> <height>22</height> </size> </property> </widget> </item> <item> <widget class="QToolButton" name="distributeAcrossMarginsToolButton"> <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> <height>22</height> </size> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer_8"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_10"> <item> <widget class="FormWidget" name="distributeByDistanceLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>By distance</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_20"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_9"> <property name="spacing"> <number>4</number> </property> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <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> <height>22</height> </size> </property> </widget> </item> <item> <widget class="ScrSpinBox" name="distributeDistSpinBox"> <property name="minimumSize"> <size> <width>50</width> <height>24</height> </size> </property> </widget> </item> <item> <widget class="QToolButton" name="reverseDistributionButton"> <property name="text"> <string/> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer_4"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> <widget class="FormWidget" name="swapLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="label" stdset="0"> <string>Swap</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_17"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_11"> <property name="spacing"> <number>4</number> </property> <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> <height>22</height> </size> </property> </widget> </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> <height>22</height> </size> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <spacer name="horizontalSpacer_5"> <property name="orientation"> <enum>Qt::Orientation::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> </layout> </widget> </widget> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Orientation::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> </item> </layout> </widget> <customwidgets> <customwidget> <class>FormWidget</class> <extends>QWidget</extends> <header>ui/widgets/form_widget.h</header> <container>1</container> </customwidget> <customwidget> <class>SectionContainer</class> <extends>QWidget</extends> <header>ui/widgets/section_container.h</header> <addpagemethod>setWidget</addpagemethod> <container>1</container> </customwidget> <customwidget> <class>ScrSpinBox</class> <extends>QDoubleSpinBox</extends> <header>ui/scrspinbox.h</header> </customwidget> <customwidget> <class>PulsingToolButton</class> <extends>QToolButton</extends> <header>ui/widgets/pulsing_toolbutton.h</header> </customwidget> </customwidgets> <includes> <include location="local">ui/scrspinbox.h</include> </includes> <resources/> <connections/> </ui> |
|
ok, i gave the icons creation a try, but inkscape does not seem to be the right tool. any hint on how to create the files in a similar clean state as yours? |
|
I used Figma for the icon creation, because it has a great icon optimization on export. Unfortunately, it has limited collaboration features in the free version. Because of that, I wanted to export the project to Penpot (open source), but the import was not great. But Penpot has the same lossless export than Inkscape. At one day I will move everything to Penpot (as soon as the importer works correctly). BTW: I added some icon specs on the wiki page too. |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-01-30 08:04 | ale | New Issue | |
2025-01-30 08:18 | ale | Description Updated | |
2025-01-30 10:14 | nitramr | Note Added: 0051957 | |
2025-01-30 10:14 | nitramr | File Added: Bildschirmfoto 2025-01-30 um 11.07.17.png | |
2025-01-30 11:03 | ale | Note Added: 0051960 | |
2025-01-30 11:07 | ale | Note Added: 0051961 | |
2025-01-30 11:07 | ale | File Added: align-one-line.png | |
2025-01-30 11:14 | ale | Note Edited: 0051961 | |
2025-01-30 11:19 | ale | Note Added: 0051962 | |
2025-01-30 21:00 | ale | Note Added: 0051969 | |
2025-01-30 21:00 | ale | File Added: designer-same-shit.png | |
2025-01-30 21:17 | nitramr | Note Added: 0051970 | |
2025-01-30 21:17 | nitramr | File Added: Bildschirmfoto vom 2025-01-30 22-17-09.png | |
2025-01-30 21:26 | ale | Note Added: 0051971 | |
2025-01-30 21:39 | nitramr | Note Added: 0051972 | |
2025-01-30 21:39 | nitramr | File Added: Bildschirmfoto vom 2025-01-30 22-33-47.png | |
2025-01-30 21:43 | ale | Note Added: 0051973 | |
2025-01-30 21:43 | ale | File Added: designer-much-better.png | |
2025-01-30 21:49 | nitramr | Note Added: 0051974 | |
2025-01-30 21:49 | nitramr | File Added: Bildschirmfoto vom 2025-01-30 22-46-47.png | |
2025-01-30 21:52 | ale | Note Added: 0051975 | |
2025-01-30 21:59 | ale | Note Added: 0051976 | |
2025-01-30 21:59 | ale | File Added: align-ok.png | |
2025-01-30 21:59 | nitramr | Note Added: 0051977 | |
2025-01-31 06:25 | ale | Note Added: 0051978 | |
2025-02-01 09:02 | ale | Note Added: 0051982 | |
2025-02-01 09:02 | ale | File Added: align-distribute-preliminary.png | |
2025-02-02 13:44 | ale | Note Added: 0051992 | |
2025-02-02 13:44 | ale | File Added: align-and-distribute-into-sections.diff | |
2025-02-02 13:44 | ale | Summary | Make the Align and distribute tool more comfortable to use => [PATCH] Make the Align and distribute tool more comfortable to use |
2025-02-02 13:44 | ale | Patch | No => Yes |
2025-02-02 13:49 | ale | Note Added: 0051993 | |
2025-02-02 15:27 | nitramr | Note Added: 0051994 | |
2025-02-02 17:13 | ale | Note Added: 0051995 | |
2025-02-02 17:13 | ale | File Added: aligndistribute.ui | |
2025-02-02 17:32 | ale | Note Added: 0051996 | |
2025-02-02 19:50 | nitramr | Note Added: 0051997 |