author | groucho <groucho> | 2003-03-26 08:48:04 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-03-26 08:48:04 (UTC) |
commit | 174bf901c2a59bbf1980ea3e770bfb33c50f1c08 (patch) (unidiff) | |
tree | 0e73b0b445fc8bd91288d8f96351aa3b54bc7f04 | |
parent | 77aa3a82f511038d81705af30a169b809ff29002 (diff) | |
download | opie-174bf901c2a59bbf1980ea3e770bfb33c50f1c08.zip opie-174bf901c2a59bbf1980ea3e770bfb33c50f1c08.tar.gz opie-174bf901c2a59bbf1980ea3e770bfb33c50f1c08.tar.bz2 |
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)
-rw-r--r-- | core/applets/rotateapplet/rotate.cpp | 8 |
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 | |||
90 | void RotateApplet::activated ( ) | 90 | void RotateApplet::activated ( ) |
91 | { | 91 | { |
92 | int currentRotation = QPEApplication::defaultRotation(); | 92 | int currentRotation = QPEApplication::defaultRotation(); |
93 | |||
93 | int newRotation; | 94 | int newRotation; |
94 | if ( m_native == true ) { | 95 | if ( m_native == true ) { |
96 | |||
95 | newRotation = currentRotation + 90; | 97 | newRotation = currentRotation + 90; |
98 | if(newRotation >= 360) newRotation = 0;//ipaqs like the 36xx have the display | ||
99 | //rotated to 270 as default, so 360 does nothing => handle this here | ||
100 | |||
96 | } else { | 101 | } else { |
97 | newRotation = currentRotation - 90; | 102 | newRotation = currentRotation - 90; |
103 | if (newRotation <=0) newRotation = 270; | ||
104 | //ipaqs like the 36xx have the display rotated | ||
105 | // to 270 as default, and -90 is invalid => handle this here | ||
98 | } | 106 | } |
99 | QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); | 107 | QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); |
100 | env << newRotation; | 108 | env << newRotation; |