From 174bf901c2a59bbf1980ea3e770bfb33c50f1c08 Mon Sep 17 00:00:00 2001 From: groucho Date: Wed, 26 Mar 2003 08:48:04 +0000 Subject: On older ipaqs the display is rotated to 270 as default so adding 90 does nothing => fixed by rotating the values (270+90=0, 0-90=370) --- 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; -- cgit v0.9.0.2