diff -r 803b277e4894 -r 3f21a9dc93d0 QTfrontend/SquareLabel.cpp --- 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(); }