r16791 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:46 UTC 2011
Author: craig
Date: Tue Aug 16 21:04:46 2011
New Revision: 16791
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16791
Log:
#10190: Add options for Ruler Mover for top/bottom centre
Modified:
trunk/Scribus/scribus/ui/rulermover.cpp
trunk/Scribus/scribus/ui/rulermover.h
Modified: trunk/Scribus/scribus/ui/rulermover.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16791&path=/trunk/Scribus/scribus/ui/rulermover.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/rulermover.cpp (original)
+++ trunk/Scribus/scribus/ui/rulermover.cpp Tue Aug 16 21:04:46 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: trunk/Scribus/scribus/ui/rulermover.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16791&path=/trunk/Scribus/scribus/ui/rulermover.h
==============================================================================
--- trunk/Scribus/scribus/ui/rulermover.h (original)
+++ trunk/Scribus/scribus/ui/rulermover.h Tue Aug 16 21:04:46 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