diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-23 00:22:25 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-23 00:22:25 +0200 |
commit | 0f99c7511410649264882a57e13c154b3d3c8568 (patch) | |
tree | 32e779214367ccf4cf9aca84057bee6cf467264e | |
parent | Merge branch 'StartRekonq' (diff) | |
parent | dynamic space between previews (diff) | |
download | rekonq-0f99c7511410649264882a57e13c154b3d3c8568.tar.xz |
Fixing merge..
Merge commit 'refs/merge-requests/1889' of git://gitorious.org/rekonq/mainline into Fri9
Conflicts:
data/home.html
-rw-r--r-- | data/home.html | 16 | ||||
-rw-r--r-- | src/homepage.cpp | 5 | ||||
-rw-r--r-- | src/previewimage.cpp | 23 |
3 files changed, 37 insertions, 7 deletions
diff --git a/data/home.html b/data/home.html index d81af731..95e61011 100644 --- a/data/home.html +++ b/data/home.html @@ -108,13 +108,27 @@ margin-right: 4px; margin-left: 4px; } + +.favorites{ +text-align: center; +} + /* -------------------------------------------------------- */ /* Thumbnail class */ .thumbnail { text-align: center; -float:left; +display: inline-block; +width:25%; margin-bottom: 7%; +min-width:250px; +min-height:192px; +} + +.thumbnail object{ +text-align: center; +width:228px; +height:192px; } /* -------------------------------------------------------- */ diff --git a/src/homepage.cpp b/src/homepage.cpp index 835be043..965bb749 100644 --- a/src/homepage.cpp +++ b/src/homepage.cpp @@ -112,7 +112,7 @@ QString HomePage::fillFavorites() QStringList names = ReKonfig::previewNames(); QStringList urls = ReKonfig::previewUrls(); - QString speed; + QString speed="<div class=\"favorites\">"; for(int i=0; i<8; ++i) { speed += "<div class=\"thumbnail\">"; @@ -123,7 +123,8 @@ QString HomePage::fillFavorites() speed += "</object>"; speed += "</div>"; } - + + speed += "</div>"; return speed; } diff --git a/src/previewimage.cpp b/src/previewimage.cpp index f5421fe3..f727db49 100644 --- a/src/previewimage.cpp +++ b/src/previewimage.cpp @@ -63,12 +63,23 @@ PreviewImage::PreviewImage(const QUrl &url, const QString &title, int index, boo , m_imageLabel(new QLabel) , m_textLabel(new QLabel) { - setMinimumSize(300,200); - + + int borderTop = 14; + int borderRight = 14; + int borderBottom = 14; + int borderLeft = 14; + + int previewWidth=200; + int previewHeight=150; + + int urlHeight=18; + setFixedSize(borderLeft+previewWidth+borderRight, borderTop+previewHeight+borderBottom+urlHeight); + m_imageLabel->setAlignment(Qt::AlignCenter); m_textLabel->setAlignment(Qt::AlignCenter); QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->setMargin(0); mainLayout->addWidget(m_imageLabel); mainLayout->addWidget(m_textLabel); setLayout(mainLayout); @@ -98,6 +109,8 @@ void PreviewImage::loadUrlPreview(const QUrl& url) return; } + m_textLabel->setMaximumSize(QWIDGETSIZE_MAX,QWIDGETSIZE_MAX); //unhide + m_savePath = KStandardDirs::locateLocal("cache", QString("thumbs/") + guessNameFromUrl(m_url) + ".png", true); if(QFile::exists(m_savePath)) @@ -170,10 +183,12 @@ void PreviewImage::showEmptyPreview() { if(!m_isFavorite) return; - + m_imageLabel->clear(); m_textLabel->clear(); - + + m_textLabel->setMaximumSize(0,0); //hide (is there an other way for hide ?) + QHBoxLayout *layout = new QHBoxLayout(m_imageLabel); m_button = new QToolButton(m_imageLabel); m_button->setDefaultAction(historyMenu()); |