diff --git a/src/lib/popupwindow/popuplocationbar.cpp b/src/lib/popupwindow/popuplocationbar.cpp index 7436cf11f..a47cea868 100644 --- a/src/lib/popupwindow/popuplocationbar.cpp +++ b/src/lib/popupwindow/popuplocationbar.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2010-2014 David Rosca +* Copyright (C) 2010-2016 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 @@ -69,7 +69,7 @@ PopupLocationBar::PopupLocationBar(QWidget* parent) addWidget(m_bookmarkIcon, LineEdit::RightSide); addWidget(m_loadingAnimation, LineEdit::RightSide); addWidget(rightSpacer, LineEdit::RightSide); - setLeftMargin(20); + setLeftMargin(24); setFixedHeight(26); setReadOnly(true); diff --git a/src/lib/popupwindow/popupwindow.cpp b/src/lib/popupwindow/popupwindow.cpp index 35e8ab4de..b5fee553a 100644 --- a/src/lib/popupwindow/popupwindow.cpp +++ b/src/lib/popupwindow/popupwindow.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2010-2015 David Rosca +* Copyright (C) 2010-2016 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 @@ -24,6 +24,8 @@ #include "qzsettings.h" #include "popuplocationbar.h" #include "qztools.h" +#include "mainapplication.h" +#include "browserwindow.h" #include #include @@ -105,7 +107,6 @@ PopupWindow::PopupWindow(PopupWebView* view) connect(m_view, SIGNAL(titleChanged(QString)), this, SLOT(titleChanged())); connect(m_view, SIGNAL(urlChanged(QUrl)), m_locationBar, SLOT(showUrl(QUrl))); connect(m_view, SIGNAL(iconChanged()), m_locationBar, SLOT(showSiteIcon())); - //connect(m_view, SIGNAL(statusBarMessage(QString)), this, SLOT(showStatusBarMessage(QString))); connect(m_view, SIGNAL(loadStarted()), this, SLOT(loadStarted())); connect(m_view, SIGNAL(loadProgress(int)), this, SLOT(loadProgress(int))); connect(m_view, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); @@ -123,6 +124,14 @@ PopupWindow::PopupWindow(PopupWebView* view) m_locationBar->showUrl(urlToShow); + if (mApp->getWindow()) { + m_statusBar->setVisible(mApp->getWindow()->statusBar()->isVisible()); + m_menuBar->setVisible(mApp->getWindow()->menuBar()->isVisible()); + + if (m_menuBar->isHidden()) + m_layout->setContentsMargins(0, 2, 0, 0); + } + // Ensuring correct sizes for widgets in layout are calculated even // before calling QWidget::show() m_layout->invalidate();