summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -87,17 +87,25 @@ QPopupMenu *RotateApplet::popup ( QWidget * ) const
return 0;
}
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;
QCopEnvelope env2( "QPE/System", "setDefaultRotation(int)" );
env2 << newRotation;