Untitled
By: a guest | Feb 9th, 2010 | Syntax:
None | Size: 1.35 KB | Hits: 41 | Expires: Never
Index: webbrowser.cpp
===================================================================
--- webbrowser.cpp (revision 1087155)
+++ webbrowser.cpp (working copy)
-27,6 +27,7 @@
#include <QStandardItemModel>
#include <QModelIndex>
#include <QAction>
+#include <QPainter>
#include <QTimer>
#include <QTreeView>
#include <QWebPage>
-522,4 +523,14 @@
emit configNeedsSaving();
}
+void WebBrowser::paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option, const QRect &contentsRect)
+{
+ p->save();
+ p->setBrush(QApplication::palette().window());
+ p->setRenderHint(QPainter::Antialiasing);
+ p->setPen(Qt::NoPen);
+ p->drawRoundedRect(m_browser->pos().x() + contentsRect.x() - 2, m_browser->pos().y() + contentsRect.y() - 2, m_browser->geometry().width() + 4, m_browser->geometry().height() + 4, 2, 2);
+ p->restore();
+}
+
#include "webbrowser.moc"
Index: webbrowser.h
===================================================================
--- webbrowser.h (revision 1087155)
+++ webbrowser.h (working copy)
-58,7 +58,8 @@
~WebBrowser();
QGraphicsWidget *graphicsWidget();
-
+ void paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option, const QRect &contentsRect);
+
//TODO: put in a separate file
enum BookmarkRoles
{