summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/rotateapplet/rotate.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp
index 653c61f..e236cd1 100644
--- a/core/applets/rotateapplet/rotate.cpp
+++ b/core/applets/rotateapplet/rotate.cpp
@@ -90,11 +90,19 @@ QPopupMenu *RotateApplet::popup ( QWidget * ) const
void RotateApplet::activated ( )
{
int currentRotation = QPEApplication::defaultRotation();
+
int newRotation;
if ( m_native == true ) {
+
newRotation = currentRotation + 90;
+ if(newRotation >= 360) newRotation = 0; //ipaqs like the 36xx have the display
+ //rotated to 270 as default, so 360 does nothing => handle this here
+
} else {
newRotation = currentRotation - 90;
+ if (newRotation <=0) newRotation = 270;
+ //ipaqs like the 36xx have the display rotated
+ // to 270 as default, and -90 is invalid => handle this here
}
QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" );
env << newRotation;