summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-23 00:22:25 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-23 00:22:25 +0200
commit0f99c7511410649264882a57e13c154b3d3c8568 (patch)
tree32e779214367ccf4cf9aca84057bee6cf467264e /src
parentMerge branch 'StartRekonq' (diff)
parentdynamic space between previews (diff)
downloadrekonq-0f99c7511410649264882a57e13c154b3d3c8568.tar.xz
Fixing merge..
Merge commit 'refs/merge-requests/1889' of git://gitorious.org/rekonq/mainline into Fri9 Conflicts: data/home.html
Diffstat (limited to 'src')
-rw-r--r--src/homepage.cpp5
-rw-r--r--src/previewimage.cpp23
2 files changed, 22 insertions, 6 deletions
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());