diff options
| -rw-r--r-- | src/webpage.cpp | 2 | ||||
| -rw-r--r-- | src/websnap.cpp | 14 | ||||
| -rw-r--r-- | src/websnap.h | 11 | 
3 files changed, 2 insertions, 25 deletions
| diff --git a/src/webpage.cpp b/src/webpage.cpp index 7e2214fa..89c52e8a 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -168,7 +168,7 @@ WebPage::~WebPage()  {      disconnect(); -    QPixmap preview = WebSnap::renderClosingPagePreview(*this); +    QPixmap preview = WebSnap::renderPagePreview(*this);      QString path = WebSnap::imagePathFromUrl(mainFrame()->url().toString());      QFile::remove(path);      preview.save(path); diff --git a/src/websnap.cpp b/src/websnap.cpp index 6bbaa06a..6db6b3be 100644 --- a/src/websnap.cpp +++ b/src/websnap.cpp @@ -103,18 +103,6 @@ QPixmap WebSnap::renderTabPreview(const QWebPage &page, int w, int h)  } -QPixmap WebSnap::renderClosingPagePreview(const QWebPage &page, int w, int h) -{ -    //scroll to top -    page.mainFrame()->setScrollBarValue(Qt::Vertical, 0); - -    // reduce as much as possible -    page.setViewportSize(QSize(10, 10)); - -    return renderPagePreview(page, w, h); -} - -  QPixmap WebSnap::renderPagePreview(const QWebPage &page, int w, int h)  {      // remove temporarily scrollbars @@ -124,7 +112,7 @@ QPixmap WebSnap::renderPagePreview(const QWebPage &page, int w, int h)      int width = page.mainFrame()->contentsSize().width();      page.setViewportSize(QSize(width, width * ((0.0 + h) / w))); -    //render +    // render      QPixmap pageImage = WebSnap::render(page, page.viewportSize().width(), page.viewportSize().height());      // resize image diff --git a/src/websnap.h b/src/websnap.h index f227f083..12a5e04c 100644 --- a/src/websnap.h +++ b/src/websnap.h @@ -90,17 +90,6 @@ public:      // TODO: try to make this method work => more previews for the urlbar      /** -     * Snaps a pixmap of size w * h from a page of a tab that is currently closing -     * -     * @param page the page to snap -     * @param w the image width -     * @param h the image height -     * -     * @return the pixmap snapped from the page -     */ -    static QPixmap renderClosingPagePreview(const QWebPage &page, int w = defaultWidth, int h = defaultHeight); - -    /**       * Snaps a pixmap of size w * h from a page for tab preview       *       * @param page the page to snap | 
