summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
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) );
}
}