summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
authorAnton Kreuzkamp <akreuzkamp@web.de>2012-06-13 22:25:32 +0200
committerAnton Kreuzkamp <akreuzkamp@web.de>2012-06-14 14:34:56 +0200
commit90a9415a0a9a02ed7dd64aa142f9cbf0c729a612 (patch)
treec2e0a9c8d8b0a2d1d8462245a84d5e1b4026e9f3 /src/newtabpage.cpp
parentFix ambiguous tab shortcuts (diff)
downloadrekonq-90a9415a0a9a02ed7dd64aa142f9cbf0c729a612.tar.xz
Apply a Plasma-like style to the new-tab-page
This commit makes previews on the new-tab-page use pure css instead of a background-image and replaces the grey background of the bookmark groups by a fancy one, looking very similiar to Plasma's Air theme. It also fixes a few minor optical dissonances on the new-tab-page. REVIEW: 105123
Diffstat (limited to 'src/newtabpage.cpp')
-rw-r--r--src/newtabpage.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index 721e0f3c..3cd241a4 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -956,15 +956,17 @@ void NewTabPage::createBookmarkItem(const KBookmark &bookmark, QWebElement paren
if (b.contains(QL1S("favicons")))
icon = cacheDir + bookmark.icon() + QL1S(".png");
- parent.appendInside(markup(QL1S("img")));
- parent.lastChild().setAttribute(QL1S("src") , icon);
- parent.lastChild().setAttribute(QL1S("width") , QL1S("16"));
- parent.lastChild().setAttribute(QL1S("height") , QL1S("16"));
- parent.appendInside(QL1S(" "));
parent.appendInside(markup(QL1S("a")));
- parent.lastChild().setAttribute(QL1S("href") , bookmark.url().prettyUrl());
- parent.lastChild().setPlainText(checkTitle(bookmark.fullText(), 40));
- parent.appendInside(QL1S("<br />"));
+ QWebElement bookmarkElement = parent.lastChild();
+ bookmarkElement.setAttribute(QL1S("href") , bookmark.url().prettyUrl());
+ bookmarkElement.addClass("bookmark");
+
+ bookmarkElement.appendInside(markup(QL1S("img")));
+ bookmarkElement.lastChild().setAttribute(QL1S("src") , icon);
+ bookmarkElement.lastChild().setAttribute(QL1S("width") , QL1S("16"));
+ bookmarkElement.lastChild().setAttribute(QL1S("height") , QL1S("16"));
+ bookmarkElement.appendInside(QL1S(" "));
+ bookmarkElement.appendInside( checkTitle(bookmark.fullText(), 40) );
}
}