diff --git a/src/QupZilla.pro b/src/QupZilla.pro index 33a9f1cdd..b207ab097 100644 --- a/src/QupZilla.pro +++ b/src/QupZilla.pro @@ -84,8 +84,7 @@ SOURCES += main.cpp\ webview/webtab.cpp \ rss/rsswidget.cpp \ autofill/autofillnotification.cpp \ - rss/rssnotification.cpp \ - tools/notification.cpp + rss/rssnotification.cpp HEADERS += 3rdparty/squeezelabel.h \ 3rdparty/qtwin.h \ @@ -139,8 +138,7 @@ HEADERS += 3rdparty/squeezelabel.h \ webview/webtab.h \ rss/rsswidget.h \ autofill/autofillnotification.h \ - rss/rssnotification.h \ - tools/notification.h + rss/rssnotification.h FORMS += \ preferences/autofillmanager.ui \ diff --git a/src/autofill/autofillnotification.cpp b/src/autofill/autofillnotification.cpp index c904c8cde..20269f67a 100644 --- a/src/autofill/autofillnotification.cpp +++ b/src/autofill/autofillnotification.cpp @@ -26,12 +26,11 @@ AutoFillNotification::AutoFillNotification(QUrl url, QByteArray data, QString pa connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); - qDebug() << this->sizeHint().height(); + m_animation = new QTimeLine(300, this); + m_animation->setFrameRange(0, sizeHint().height()); + setMinimumHeight(1); setMaximumHeight(1); - - m_animation = new QTimeLine(300, this); - m_animation->setFrameRange(0, 35); connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int))); QTimer::singleShot(1, m_animation, SLOT(start())); } diff --git a/src/rss/rssnotification.cpp b/src/rss/rssnotification.cpp index fef322ba9..abdd488b3 100644 --- a/src/rss/rssnotification.cpp +++ b/src/rss/rssnotification.cpp @@ -9,8 +9,6 @@ RSSNotification::RSSNotification(QString host, QWidget *parent) : { setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(this); - setMinimumHeight(1); - setMaximumHeight(1); ui->closeButton->setIcon( #ifdef Q_WS_X11 style()->standardIcon(QStyle::SP_DialogCloseButton) @@ -25,7 +23,10 @@ RSSNotification::RSSNotification(QString host, QWidget *parent) : connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); m_animation = new QTimeLine(300, this); - m_animation->setFrameRange(0, 35); + m_animation->setFrameRange(0, sizeHint().height()); + + setMinimumHeight(1); + setMaximumHeight(1); connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int))); QTimer::singleShot(1, m_animation, SLOT(start())); } diff --git a/src/tools/notification.cpp b/src/tools/notification.cpp deleted file mode 100644 index f0320714b..000000000 --- a/src/tools/notification.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "notification.h" - -Notification::Notification(QWidget *parent) : - QWidget(parent) -{ -} diff --git a/src/tools/notification.h b/src/tools/notification.h deleted file mode 100644 index 30f9239d7..000000000 --- a/src/tools/notification.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef NOTIFICATION_H -#define NOTIFICATION_H - -#include - -class Notification : public QWidget -{ - Q_OBJECT -public: - explicit Notification(QWidget *parent = 0); - -signals: - -public slots: - -}; - -#endif // NOTIFICATION_H