demos/embedded/anomaly/src/ControlStrip.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 29 b72c6db6890b
--- a/demos/embedded/anomaly/src/ControlStrip.cpp	Fri Apr 16 15:50:13 2010 +0300
+++ b/demos/embedded/anomaly/src/ControlStrip.cpp	Mon May 03 13:17:34 2010 +0300
@@ -75,23 +75,22 @@
     }
 
     if (x > width() - h) {
-    		emit closeClicked();    		
-    		event->accept();
-    		return;
-            
-        }
+        emit closeClicked();
+        event->accept();
+        return;
+    }
 
     if ((x < width() - 2 * h) && (x > width() - 3 * h)) {
-    		emit forwardClicked();
-    		event->accept();
-    		return;
-        }
+        emit forwardClicked();
+        event->accept();
+        return;
+    }
 
     if ((x < width() - 3 * h) && (x > width() - 5 * h)) {
-    		emit backClicked();
-    		event->accept();
-    		return;
-        }
+        emit backClicked();
+        event->accept();
+        return;
+    }
 }
 
 void ControlStrip::paintEvent(QPaintEvent *event)
@@ -99,14 +98,13 @@
     int h = height();
     int s = (h - menuPixmap.height()) / 2;
 
+    QPainter p(this);
+    p.fillRect(event->rect(), QColor(32, 32, 32, 192));
+    p.setCompositionMode(QPainter::CompositionMode_SourceOver);
+    p.drawPixmap(s, s, menuPixmap);
+    p.drawPixmap(width() - h + s, s, closePixmap);
+    p.drawPixmap(width() - 3 * h + s, s, forwardPixmap);
+    p.drawPixmap(width() - 5 * h + s, s, backPixmap);
 
-	QPainter p(this);
-	p.fillRect(event->rect(), QColor(32, 32, 32, 192));
-	p.setCompositionMode(QPainter::CompositionMode_SourceOver);
-	p.drawPixmap(s, s, menuPixmap);
-	p.drawPixmap(width() - h + s, s, closePixmap);	    
-	p.drawPixmap(width() - 3 * h + s, s, forwardPixmap);
-	p.drawPixmap(width() - 5 * h + s, s, backPixmap);
-	    
-	p.end();
+    p.end();
 }