From: <> Date: Sat, 23 Jan 2010 14:06:48 +0000 (+0100) Subject: Removed custom background gradient X-Git-Tag: 0.9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=700d3fc499f68f5afea106eee06d0e02e72a53fb;p=minitube Removed custom background gradient --- diff --git a/src/AboutView.cpp b/src/AboutView.cpp index 2d727d2..68ec04f 100644 --- a/src/AboutView.cpp +++ b/src/AboutView.cpp @@ -76,14 +76,3 @@ AboutView::AboutView(QWidget *parent) : QWidget(parent) { layout->addLayout(buttonLayout); } - -void AboutView::paintEvent(QPaintEvent * /*event*/) { -#ifdef Q_WS_MAC - QPainter painter(this); - QLinearGradient linearGrad(0, 0, 0, height()); - QPalette palette; - linearGrad.setColorAt(0, palette.color(QPalette::Light)); - linearGrad.setColorAt(1, palette.color(QPalette::Midlight)); - painter.fillRect(0, 0, width(), height(), QBrush(linearGrad)); -#endif -} diff --git a/src/AboutView.h b/src/AboutView.h index 4344342..ba5fb7f 100644 --- a/src/AboutView.h +++ b/src/AboutView.h @@ -22,8 +22,5 @@ public: return metadata; } -protected: - void paintEvent(QPaintEvent *); - }; #endif diff --git a/src/SearchView.cpp b/src/SearchView.cpp index 62eb5dc..b4437bd 100644 --- a/src/SearchView.cpp +++ b/src/SearchView.cpp @@ -10,12 +10,6 @@ static const int PADDING = 30; SearchView::SearchView(QWidget *parent) : QWidget(parent) { -#ifdef Q_WS_MAC - // speedup painting since we'll paint the whole background - // by ourselves anyway in paintEvent() - setAttribute(Qt::WA_OpaquePaintEvent); -#endif - QFont biggerFont; biggerFont.setPointSize(biggerFont.pointSize()*1.5); @@ -112,19 +106,6 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) { checkForUpdate(); } -void SearchView::paintEvent(QPaintEvent * /*event*/) { - -#ifdef Q_WS_MAC - QPainter painter(this); - QLinearGradient linearGrad(0, 0, 0, height()); - QPalette palette; - linearGrad.setColorAt(0, palette.color(QPalette::Light)); - linearGrad.setColorAt(1, palette.color(QPalette::Midlight)); - painter.fillRect(0, 0, width(), height(), QBrush(linearGrad)); -#endif - -} - void SearchView::updateRecentKeywords() { // cleanup diff --git a/src/SearchView.h b/src/SearchView.h index fe4e939..caa0309 100644 --- a/src/SearchView.h +++ b/src/SearchView.h @@ -33,9 +33,6 @@ public slots: void watch(QString query); void gotNewVersion(QString version); -protected: - void paintEvent(QPaintEvent *); - signals: void search(QString query);