r16790 by craig - #10190: Add options for Ruler Mover for top/bottom centre
scribus-commit
scribus-commit at lists.scribus.net
Tue Aug 16 21:04:13 UTC 2011
Author: craig
Date: Tue Aug 16 21:04:13 2011
New Revision: 16790
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16790
Log:
#10190: Add options for Ruler Mover for top/bottom centre
Modified:
branches/Version135/Scribus/scribus/rulermover.cpp
branches/Version135/Scribus/scribus/rulermover.h
Modified: branches/Version135/Scribus/scribus/rulermover.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16790&path=/branches/Version135/Scribus/scribus/rulermover.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/rulermover.cpp (original)
+++ branches/Version135/Scribus/scribus/rulermover.cpp Tue Aug 16 21:04:13 2011
@@ -91,6 +91,8 @@
pmen2->addAction( tr("Origin at Bottom Left"), this, SLOT(moveRulerBottomLeft()));
pmen2->addAction( tr("Origin at Bottom Right"), this, SLOT(moveRulerBottomRight()));
pmen2->addAction( tr("Origin at Center"), this, SLOT(moveRulerCenter()));
+ pmen2->addAction( tr("Origin at Top Center"), this, SLOT(moveRulerTopCenter()));
+ pmen2->addAction( tr("Origin at Bottom Center"), this, SLOT(moveRulerBottomCenter()));
pmen->addMenu(pmen2);
}
}
@@ -143,3 +145,18 @@
currView->Doc->rulerYoffset = currView->Doc->currentPage()->height() / 2.0;
currView->DrawNew();
}
+
+void RulerMover::moveRulerTopCenter()
+{
+ currView->Doc->rulerXoffset = currView->Doc->currentPage()->width() / 2.0;
+ currView->Doc->rulerYoffset = 0;
+ currView->DrawNew();
+}
+
+void RulerMover::moveRulerBottomCenter()
+{
+ currView->Doc->rulerXoffset = currView->Doc->currentPage()->width() / 2.0;
+ currView->Doc->rulerYoffset = currView->Doc->currentPage()->height();
+ currView->DrawNew();
+}
+
Modified: branches/Version135/Scribus/scribus/rulermover.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16790&path=/branches/Version135/Scribus/scribus/rulermover.h
==============================================================================
--- branches/Version135/Scribus/scribus/rulermover.h (original)
+++ branches/Version135/Scribus/scribus/rulermover.h Tue Aug 16 21:04:13 2011
@@ -50,6 +50,9 @@
void moveRulerBottomLeft();
void moveRulerBottomRight();
void moveRulerCenter();
+ void moveRulerTopCenter();
+ void moveRulerBottomCenter();
+
private: // Private attributes
ScribusView *currView;
RulerGesture* rulerGesture;
More information about the scribus-commit
mailing list