summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/CMakeLists.txt2
-rw-r--r--data/bg2.pngbin0 -> 1898 bytes
-rw-r--r--data/button.pngbin0 -> 740 bytes
-rw-r--r--data/home.html23
-rw-r--r--data/tile.gifbin514 -> 304 bytes
-rw-r--r--src/homepage.cpp8
-rw-r--r--src/websnap.cpp19
-rw-r--r--src/websnap.h2
8 files changed, 32 insertions, 22 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 34676cf0..bf01a44d 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,5 +1,5 @@
INSTALL(
- FILES bg.png bot.gif busywidget.gif closed.png loading.mng open.png tile.gif top.png webkit-icon.png category.png
+ FILES bg2.png bg.png bot.gif busywidget.gif closed.png loading.mng open.png tile.gif top.png webkit-icon.png category.png button.png
DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics
)
diff --git a/data/bg2.png b/data/bg2.png
new file mode 100644
index 00000000..1ded2690
--- /dev/null
+++ b/data/bg2.png
Binary files differ
diff --git a/data/button.png b/data/button.png
new file mode 100644
index 00000000..22ef7643
--- /dev/null
+++ b/data/button.png
Binary files differ
diff --git a/data/home.html b/data/home.html
index 15cb3b34..893f5d76 100644
--- a/data/home.html
+++ b/data/home.html
@@ -66,9 +66,12 @@ width: 100%;
}
#navigation {
-margin-top: 1%;
-margin-bottom: 4%;
+display: inline-block;
+margin-top: 2%;
+margin-bottom: 3%;
text-align: center;
+border-width: 5px;
+-webkit-border-image: url(%2/bg2.png) 12 12 12 12 stretch stretch;
}
#content {
@@ -81,24 +84,28 @@ margin: 2%;
.link{
display: inline-block;
-padding: 0 2%;
}
.link img{
-float:left;
+vertical-align: middle;
+margin-right: 5px;
}
.link a{
color: black;
text-decoration:none;
-font: normal bold 1.2em/2.5em sans-serif;
-vertical-align: middle;
+font: normal 1em sans-serif;
}
-#navigation .link:not(.current):not(.link:hover){
--webkit-opacity: 0.3;
+.current{
+border-width: 6px;
+-webkit-border-image: url(%2/button.png) 6 stretch stretch;
}
+#navigation .link:not(.current){
+margin-right: 4px;
+margin-left: 4px;
+}
/* -------------------------------------------------------- */
/* Thumbnail class */
diff --git a/data/tile.gif b/data/tile.gif
index 5f739e49..32e06fff 100644
--- a/data/tile.gif
+++ b/data/tile.gif
Binary files differ
diff --git a/src/homepage.cpp b/src/homepage.cpp
index 1328fc8d..835be043 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -158,7 +158,7 @@ QString HomePage::homePageMenu(KUrl currentUrl)
if(currentUrl == "rekonq:favorites" || currentUrl == "rekonq:home")
menu += " current";
menu += "\"><a href=\"rekonq:favorites\">";
- menu += "<img src=\"file:///" + loader->iconPath("emblem-favorite", KIconLoader::Desktop) + "\" />";
+ menu += "<img src=\"file:///" + loader->iconPath("emblem-favorite", KIconLoader::Desktop || KIconLoader::SizeSmall) + "\" />";
menu += i18n("Favorites");
menu += "</a></div>";
@@ -166,7 +166,7 @@ QString HomePage::homePageMenu(KUrl currentUrl)
if(currentUrl == "rekonq:closedTabs")
menu += " current";
menu += "\"><a href=\"rekonq:closedTabs\">";
- menu += "<img src=\"file:///" + loader->iconPath("tab-close", KIconLoader::Desktop) + "\" />";
+ menu += "<img src=\"file:///" + loader->iconPath("tab-close", KIconLoader::Desktop || KIconLoader::SizeSmall) + "\" />";
menu += i18n("Closed Tabs");
menu += "</a></div>";
@@ -174,7 +174,7 @@ QString HomePage::homePageMenu(KUrl currentUrl)
if(currentUrl == "rekonq:bookmarks")
menu += " current";
menu += "\"><a href=\"rekonq:bookmarks\">";
- menu += "<img src=\"file:///" + loader->iconPath("bookmarks", KIconLoader::Desktop) + "\" />";
+ menu += "<img src=\"file:///" + loader->iconPath("bookmarks", KIconLoader::Desktop || KIconLoader::SizeSmall) + "\" />";
menu += i18n("Bookmarks");
menu += "</a></div>";
@@ -182,7 +182,7 @@ QString HomePage::homePageMenu(KUrl currentUrl)
if(currentUrl == "rekonq:history")
menu += " current";
menu += "\"><a href=\"rekonq:history\">";
- menu += "<img src=\"file:///" + loader->iconPath("view-history", KIconLoader::Desktop) + "\" />";
+ menu += "<img src=\"file:///" + loader->iconPath("view-history", KIconLoader::Desktop || KIconLoader::SizeSmall) + "\" />";
menu += i18n("History");
menu += "</a></div>";
diff --git a/src/websnap.cpp b/src/websnap.cpp
index 5727bc6f..bb2baf49 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -74,7 +74,7 @@ void WebSnap::load()
}
-QPixmap WebSnap::renderPreview(const QWebPage &page,int w, int h)
+QPixmap WebSnap::renderPreview(const QWebPage &page,int w, int h, bool border)
{
// prepare page
page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); // Why it doesn't work with one setScrollBarPolicy?
@@ -105,6 +105,15 @@ QPixmap WebSnap::renderPreview(const QWebPage &page,int w, int h)
p.end();
pageImage = pageImage.scaled(w, h, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
+ // restore page settings
+ page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded);
+ page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded);
+ page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded);
+ page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded);
+
+ if(!border)
+ return QPixmap::fromImage(pageImage);
+
// background image
QSize fixedSize(w + 30, h + 26);
QImage backImage = QImage(fixedSize, QImage::Format_ARGB32_Premultiplied);
@@ -126,12 +135,6 @@ QPixmap WebSnap::renderPreview(const QWebPage &page,int w, int h)
pt.fillRect(resultImage.rect(), Qt::transparent);
pt.end();
- // restore page settings
- page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded);
- page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded);
- page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded);
- page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded);
-
return QPixmap::fromImage(resultImage);
}
@@ -145,7 +148,7 @@ void WebSnap::saveResult(bool ok)
return;
}
- m_image = renderPreview(m_page, WIDTH, HEIGHT);
+ m_image = renderPreview(m_page, WIDTH, HEIGHT, true);
emit finished();
}
diff --git a/src/websnap.h b/src/websnap.h
index 6c5b4af9..026c236c 100644
--- a/src/websnap.h
+++ b/src/websnap.h
@@ -52,7 +52,7 @@ public:
~WebSnap();
QPixmap previewImage();
- static QPixmap renderPreview(const QWebPage &page, int w, int h);
+ static QPixmap renderPreview(const QWebPage &page, int w, int h, bool border = false);
QString snapTitle();
QUrl snapUrl();