From d1d99e3b7141159ead661dbbd439d9b9028df510 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 4 Jan 2018 17:38:41 +0100 Subject: [PATCH] PopupWindow: Add margins around locationbar and line between webview --- src/lib/popupwindow/popupwindow.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/lib/popupwindow/popupwindow.cpp b/src/lib/popupwindow/popupwindow.cpp index cd963b15a..c6499c69d 100644 --- a/src/lib/popupwindow/popupwindow.cpp +++ b/src/lib/popupwindow/popupwindow.cpp @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2010-2017 David Rosca +* Copyright (C) 2010-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,11 +39,17 @@ PopupWindow::PopupWindow(PopupWebView* view) { m_layout = new QVBoxLayout(this); m_layout->setContentsMargins(0, 0, 0, 0); - m_layout->setSpacing(2); + m_layout->setSpacing(0); m_locationBar = new PopupLocationBar(this); m_locationBar->setView(m_view); + QWidget *locationWidget = new QWidget(this); + QVBoxLayout *llayout = new QVBoxLayout(); + llayout->setContentsMargins(3, 3, 3, 5); + llayout->addWidget(m_locationBar); + locationWidget->setLayout(llayout); + m_statusBar = new QStatusBar(this); m_statusBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); @@ -65,6 +71,13 @@ PopupWindow::PopupWindow(PopupWebView* view) nlayout->setContentsMargins(0, 0, 0, 0); nlayout->setSpacing(1); + QWidget *viewSpacer = new QWidget(this); + pal = viewSpacer->palette(); + pal.setColor(QPalette::Background, pal.window().color().darker(125)); + viewSpacer->setPalette(pal); + viewSpacer->setFixedHeight(1); + viewSpacer->setAutoFillBackground(true); + m_menuBar = new QMenuBar(this); QMenu* menuFile = new QMenu(tr("File")); @@ -117,7 +130,8 @@ PopupWindow::PopupWindow(PopupWebView* view) viewWidget->setLayout(l); m_layout->insertWidget(0, m_menuBar); - m_layout->addWidget(m_locationBar); + m_layout->addWidget(locationWidget); + m_layout->addWidget(viewSpacer); m_layout->addWidget(viewWidget); m_layout->addWidget(m_statusBar); setLayout(m_layout);