Index: scribus/ui/guidemanager.ui
===================================================================
--- scribus/ui/guidemanager.ui (revision 27810)
+++ scribus/ui/guidemanager.ui (working copy)
@@ -8,7 +8,7 @@
0
0
- 428
+ 340
368
@@ -35,7 +35,7 @@
- &Single
+ &Manual Guides
@@ -55,10 +55,13 @@
-
- Horizontals
+ &Horizontal Guides
-
-
+
+ 5
+
+
-
true
@@ -66,33 +69,37 @@
QAbstractItemView::SelectRows
+
+ true
+
- -
-
-
- Add a new horizontal guide
+
-
+
+
+ 5
-
- &Add
-
-
- Alt+A
-
-
-
- -
-
-
- Delete the selected horizontal guide
-
-
- D&elete
-
-
- Alt+E
-
-
+
-
+
+
+ Add a new horizontal guide
+
+
+
+
+
+
+ -
+
+
+ Delete the selected horizontal guide
+
+
+
+
+
+
+
@@ -100,10 +107,13 @@
-
- Verticals
+ &Vertical Guides
-
-
+
+ 5
+
+
-
true
@@ -111,70 +121,91 @@
QAbstractItemView::SelectRows
+
+ true
+
- -
-
-
- Add a new vertical guide
+
-
+
+
+ 5
-
- A&dd
-
-
- Alt+D
-
-
-
- -
-
-
- Delete the selected vertical guide
-
-
- De&lete
-
-
- Alt+L
-
-
+
-
+
+
+ Add a new vertical guide
+
+
+
+
+
+
+ -
+
+
+ Delete the selected vertical guide
+
+
+
+
+
+
+
- -
-
-
- Lock the guides
+
-
+
+
+ 8
-
- &Lock Guides
-
-
- Alt+L
-
-
-
- -
-
-
- Apply to all pages
-
-
- Appl&y to All Pages
-
-
- Alt+Y
-
-
+
-
+
+
+ Lock the guides
+
+
+ Lock Guides
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Expanding
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Replace the manual guides on all other pages with the manual guides from the current page
+
+
+ Copy Guides to All Pages
+
+
+
+
- &Column/Row
+ &Rows && Columns
@@ -189,119 +220,169 @@
9
- -
-
-
- Apply the shown guides to all pages in the document
-
-
- Appl&y to All Pages
-
-
- Alt+Y
-
-
-
-
- Horizontals
+ &Horizontal Guides
+
+ 20
+
+
+ 8
+
-
-
-
- &Number:
-
-
- false
-
-
- horizontalAutoCountSpin
-
+
+
+ Relative to
+
+
+
+ 5
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Relative to page
+
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Relative to margins
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Relative to selection
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+
-
-
-
- Number of horizontal guides to create
-
-
-
-
-
- 0
-
-
- 0
-
-
-
- -
+
+
+ Number
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 100
+ 0
+
+
+
+
+ 100
+ 16777215
+
+
+
+ Number of horizontal guides to create
+
+
+
+
+
+ 0
+
+
+ 0
+
+
+
+
+
+
+ -
- Create rows with guides, with an additional gap between the rows
+ Set the gap between adjacent generated rows
- U&se Gap:
-
-
- Alt+S
-
-
-
- -
-
-
- -
-
-
- Refer to
-
-
-
-
-
-
- Create the selected number of horizontal guides relative to the current page
-
-
- &Page
-
-
- Alt+P
-
-
- true
-
-
-
- -
-
-
- Create the selected number of horizontal guides relative to the current page's margins
-
-
- M&argins
-
-
- Alt+A
-
-
-
- -
-
-
- Create the selected number of horizontal guides relative to the current selection of items
-
-
- S&election
-
-
- Alt+E
-
-
-
-
+ Gap:
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+
+ 100
+ 16777215
+
+
+
+ Set the gap between adjacent generated rows
+
@@ -310,109 +391,205 @@
-
- Verticals
+ &Vertical Guides
+
+ 20
+
+
+ 8
+
-
-
-
- Nu&mber:
-
-
- false
-
-
- verticalAutoCountSpin
-
+
+
+ Relative to
+
+
+
+ 5
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Relative to page
+
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Relative to margins
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Relative to selection
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+
-
-
-
- Number of vertical guides to create
-
-
-
-
-
- 0
-
-
- 0
-
-
-
- -
+
+
+ Number
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 100
+ 0
+
+
+
+
+ 100
+ 16777215
+
+
+
+ Number of vertical guides to create
+
+
+
+
+
+ 0
+
+
+ 0
+
+
+
+
+
+
+ -
- Create columns with guides, with an additional gap between the columns
+ Set the gap between adjacent generated columns
- Use &Gap:
-
-
- Alt+G
-
-
-
- -
-
-
- -
-
-
- Refer to
-
-
-
-
-
-
- Create the selected number of vertical guides relative to the current page
-
-
- &Page
-
-
- Alt+P
-
-
- true
-
-
-
- -
-
-
- Create the selected number of vertical guides relative to the current page's margins
-
-
- M&argins
-
-
- Alt+A
-
-
-
- -
-
-
- Create the selected number of vertical guides relative to the current selection of items
-
-
- S&election
-
-
- Alt+E
-
-
-
-
+ Gap:
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+
+ 100
+ 16777215
+
+
+
+ Set the gap between adjacent generated columns
+
- -
+
-
+
+
+ 8
+
+
-
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Expanding
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Apply the current row and column guide settings to all pages in the document
+
+
+ Apply Settings to All Pages
+
+
+
+
+
+ -
Qt::Vertical
@@ -427,72 +604,71 @@
-
-
- &Misc
-
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
- -
-
-
- Delete all guides from the current page
-
-
- Delete Guides from Current &Page
-
-
- Alt+P
-
-
-
- -
-
-
- Delete all guides from the current document
-
-
- Delete Guides from &All Pages
-
-
- Alt+A
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Expanding
-
-
-
- 20
- 40
-
-
-
-
-
-
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Expanding
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Delete all guides from the current page
+
+
+ Clear Page Guides
+
+
+
+ -
+
+
+ Delete all guides from the current document
+
+
+ Clear All Guides
+
+
+
+
+
+ FormWidget
+ QWidget
+
+ 1
+
ScrSpinBox
QDoubleSpinBox
Index: scribus/ui/guidemanager.cpp
===================================================================
--- scribus/ui/guidemanager.cpp (revision 27810)
+++ scribus/ui/guidemanager.cpp (working copy)
@@ -27,6 +27,7 @@
#include "guidemanager.h"
#include "guidesdelegate.h"
#include "guidesmodel.h"
+#include "iconmanager.h"
#include "scpage.h"
#include "scribuscore.h"
#include "scribusdoc.h"
@@ -41,12 +42,25 @@
{
setupUi(this);
tabWidget->setEnabled(false);
+ globalGuideControls->setEnabled(false);
horizontalAutoGapSpin->setMinimum(0.0);
horizontalAutoGapSpin->setMaximum(10000.0);
verticalAutoGapSpin->setMinimum(0.0);
verticalAutoGapSpin->setMaximum(10000.0);
horizontalAutoCountSpin->setDecimals(0);
verticalAutoCountSpin->setDecimals(0);
+
+ IconManager& im = IconManager::instance();
+ addHorButton->setIcon(im.loadIcon("list-add"));
+ delHorButton->setIcon(im.loadIcon("edit-delete"));
+ addVerButton->setIcon(im.loadIcon("list-add"));
+ delVerButton->setIcon(im.loadIcon("edit-delete"));
+ horizontalPageAutoButton->setIcon(im.loadIcon("align-to-page"));
+ horizontalMarginsAutoButton->setIcon(im.loadIcon("align-to-margin"));
+ horizontalSelectionAutoButton->setIcon(im.loadIcon("align-to-last-selection"));
+ verticalPageAutoButton->setIcon(im.loadIcon("align-to-page"));
+ verticalMarginsAutoButton->setIcon(im.loadIcon("align-to-margin"));
+ verticalSelectionAutoButton->setIcon(im.loadIcon("align-to-last-selection"));
// MVC
horizontalModel = new GuidesModel(this);
@@ -122,6 +136,7 @@
if (!m_doc)
currentPage = nullptr;
tabWidget->setEnabled(doc != nullptr);
+ globalGuideControls->setEnabled(doc != nullptr);
}
void GuideManager::setVisible(bool visible)
@@ -243,20 +258,14 @@
if (!m_doc)
return;
- // a little bit magic to get Verticals (unit) into group boxes
- horizontalGroupBox->setTitle(horizontalGroupBox->title().remove(" ("+suffix.trimmed()+")"));
- verticalGroupBox->setTitle(verticalGroupBox->title().remove(" ("+suffix.trimmed()+")"));
docUnitIndex = m_doc->unitIndex();
int docUnitDecimals = unitGetPrecisionFromIndex(docUnitIndex);
QSignalBlocker horizontalAutoGapSpinBlock(horizontalAutoGapSpin);
QSignalBlocker verticalAutoGapSpinBlock(verticalAutoGapSpin);
- suffix = unitGetSuffixFromIndex(docUnitIndex);
horizontalAutoGapSpin->setNewUnit(docUnitIndex);
verticalAutoGapSpin->setNewUnit(docUnitIndex);
- horizontalGroupBox->setTitle(horizontalGroupBox->title() + " ("+suffix.trimmed()+")");
- verticalGroupBox->setTitle(verticalGroupBox->title() + " ("+suffix.trimmed()+")");
// models display
horizontalModel->unitChange(docUnitIndex, docUnitDecimals, m_doc->rulerYoffset);
verticalModel->unitChange(docUnitIndex, docUnitDecimals, m_doc->rulerXoffset);
Index: scribus/ui/guidemanager.h
===================================================================
--- scribus/ui/guidemanager.h (revision 27810)
+++ scribus/ui/guidemanager.h (working copy)
@@ -92,9 +92,6 @@
//! \brief Document measurements and metrics
int docUnitIndex { 0 };
- //! \brief suffix of the unit [mm, ...]
- QString suffix;
-
/*! \brief Copy guides from currentPage to all remaining.
All gudes are deleted before copying.
\param t a type to clear and copy.*/
Index: scribus/guidesmodel.cpp
===================================================================
--- scribus/guidesmodel.cpp (revision 27810)
+++ scribus/guidesmodel.cpp (working copy)
@@ -43,7 +43,7 @@
return QVariant(l.toString(pts2value(m_values.at(index.row()) - m_rule,
m_docUnitIndex), 'f',
m_docUnitDecimals)
- );
+ + unitGetSuffixFromIndex(m_docUnitIndex));
}
if (role == Qt::EditRole)
return pts2value(m_values.at(index.row()) - m_rule, m_docUnitIndex);