diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-09-19 10:50:41 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-09-19 10:50:41 (GMT) |
commit | 3b30c14b760312413135e6324b642b7aaaa0d865 (patch) | |
tree | 013bee71ba904f6b7eb7d041269033342f4e68f4 | |
parent | fcc39978b2124df5739e8d5ceef84ad0fae66724 (diff) | |
download | swift-contrib-3b30c14b760312413135e6324b642b7aaaa0d865.zip swift-contrib-3b30c14b760312413135e6324b642b7aaaa0d865.tar.bz2 |
Sink the chatview on X11, so it seems better integrated.
-rw-r--r-- | Swift/QtUI/QtChatView.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp index ab093db..0a02591 100644 --- a/Swift/QtUI/QtChatView.cpp +++ b/Swift/QtUI/QtChatView.cpp @@ -6,6 +6,7 @@ #include <QWebView> #include <QWebFrame> #include <QKeyEvent> +#include <QStackedWidget> namespace Swift { @@ -15,10 +16,21 @@ QtChatView::QtChatView(QWidget* parent) : QWidget(parent) { QVBoxLayout* mainLayout = new QVBoxLayout(this); mainLayout->setSpacing(0); mainLayout->setContentsMargins(0,0,0,0); - webView_ = new QWebView(this); webView_->setFocusPolicy(Qt::NoFocus); +#ifdef Q_WS_X11 + /* To give a border on Linux, where it looks bad without */ + QStackedWidget* stack = new QStackedWidget(this); + stack->addWidget(webView_); + stack->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + stack->setLineWidth(2); + mainLayout->addWidget(stack); +#else mainLayout->addWidget(webView_); +#endif + + + webPage_ = new QWebPage(this); webPage_->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); |