]> git.sur5r.net Git - minitube/commitdiff
Move painter inside ifdef
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 7 Sep 2009 08:36:36 +0000 (10:36 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 7 Sep 2009 08:36:36 +0000 (10:36 +0200)
src/SearchView.cpp

index 6d95d9664f8ec45c0f4506f744c9295dd6e4777d..f7d857d3a05a8df1cfdc1d36bece2e692054671f 100644 (file)
@@ -110,9 +110,8 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) {
 
 void SearchView::paintEvent(QPaintEvent * /*event*/) {
 
-    QPainter painter(this);
-
 #ifdef Q_WS_MAC
+    QPainter painter(this);
     QLinearGradient linearGrad(0, 0, 0, height());
     QPalette palette;
     linearGrad.setColorAt(0, palette.color(QPalette::Light));
@@ -120,15 +119,6 @@ void SearchView::paintEvent(QPaintEvent * /*event*/) {
     painter.fillRect(0, 0, width(), height(), QBrush(linearGrad));
 #endif
 
-    /*
-    QPixmap watermark = QPixmap(":/images/app.png");
-    painter.setOpacity(.25);
-    painter.drawPixmap(width() - watermark.width() - PADDING,
-                       height() - watermark.height() - PADDING,
-                       watermark.width(),
-                       watermark.height(),
-                       watermark);
-                       */
 }
 
 void SearchView::updateRecentKeywords() {