aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow')
-rw-r--r--src/mainwindow/mainwindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index 6558c65..b2c79cc 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -30,6 +30,10 @@
#include <QJsonArray>
#include "browser.h"
+#ifdef PLASMA_BLUR
+#include <KWindowEffects>
+#endif
+
MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
: QMainWindow(parent)
, mdiArea(new QMdiArea(this))
@@ -37,6 +41,11 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
Q_ASSERT(config);
m_config = config;
+#ifdef PLASMA_BLUR
+ setAttribute(Qt::WA_TranslucentBackground, true);
+ KWindowEffects::enableBlurBehind(this->winId(), true);
+#endif
+
// create UI
setWindowTitle(QString::fromStdString(config->value<std::string>("mainwindow.title").value()));
resize(config->value<int>("mainwindow.width").value(), config->value<int>("mainwindow.height").value());
@@ -55,6 +64,7 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
addressBar = new AddressBar(config->section("addressbar"), this);
navigationToolBar->addWidget(addressBar);
+ mdiArea->setBackground(Qt::NoBrush);
setCentralWidget(mdiArea);
mdiArea->setFocus();