QTfrontend/SquareLabel.cpp
changeset 2948 3f21a9dc93d0
parent 2098 c977d7f2aa09
child 3236 4ab3917d7d44
--- a/QTfrontend/SquareLabel.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/SquareLabel.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -22,27 +22,27 @@
 #include "hwform.h"
 
 SquareLabel::SquareLabel(QWidget * parent) :
-	QWidget(parent)
+    QWidget(parent)
 {
     if(frontendEffects) setAttribute(Qt::WA_PaintOnScreen, true);
 }
 
 void SquareLabel::paintEvent(QPaintEvent * event)
 {
-	QPainter painter(this);
-	int pixsize;
-	if (width() > height()) {
-		pixsize = height();
-		painter.translate((width() - pixsize) / 2, 0);
-	} else {
-		pixsize = width();
-		painter.translate(0, (height() - pixsize) / 2);
-	}
-	painter.drawPixmap(0, 0, pixsize, pixsize, pixmap.scaled(pixsize, pixsize, Qt::KeepAspectRatio));
+    QPainter painter(this);
+    int pixsize;
+    if (width() > height()) {
+        pixsize = height();
+        painter.translate((width() - pixsize) / 2, 0);
+    } else {
+        pixsize = width();
+        painter.translate(0, (height() - pixsize) / 2);
+    }
+    painter.drawPixmap(0, 0, pixsize, pixsize, pixmap.scaled(pixsize, pixsize, Qt::KeepAspectRatio));
 }
 
 void SquareLabel::setPixmap(const QPixmap & pixmap)
 {
-	this->pixmap = pixmap;
-	repaint();
+    this->pixmap = pixmap;
+    repaint();
 }