mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
PopupWindow: Show statusbar and menubar according to preferences
This commit is contained in:
parent
e487e4c1f6
commit
8e93a76ca2
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* 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_bookmarkIcon, LineEdit::RightSide);
|
||||||
addWidget(m_loadingAnimation, LineEdit::RightSide);
|
addWidget(m_loadingAnimation, LineEdit::RightSide);
|
||||||
addWidget(rightSpacer, LineEdit::RightSide);
|
addWidget(rightSpacer, LineEdit::RightSide);
|
||||||
setLeftMargin(20);
|
setLeftMargin(24);
|
||||||
|
|
||||||
setFixedHeight(26);
|
setFixedHeight(26);
|
||||||
setReadOnly(true);
|
setReadOnly(true);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2015 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -24,6 +24,8 @@
|
||||||
#include "qzsettings.h"
|
#include "qzsettings.h"
|
||||||
#include "popuplocationbar.h"
|
#include "popuplocationbar.h"
|
||||||
#include "qztools.h"
|
#include "qztools.h"
|
||||||
|
#include "mainapplication.h"
|
||||||
|
#include "browserwindow.h"
|
||||||
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
|
@ -105,7 +107,6 @@ PopupWindow::PopupWindow(PopupWebView* view)
|
||||||
connect(m_view, SIGNAL(titleChanged(QString)), this, SLOT(titleChanged()));
|
connect(m_view, SIGNAL(titleChanged(QString)), this, SLOT(titleChanged()));
|
||||||
connect(m_view, SIGNAL(urlChanged(QUrl)), m_locationBar, SLOT(showUrl(QUrl)));
|
connect(m_view, SIGNAL(urlChanged(QUrl)), m_locationBar, SLOT(showUrl(QUrl)));
|
||||||
connect(m_view, SIGNAL(iconChanged()), m_locationBar, SLOT(showSiteIcon()));
|
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(loadStarted()), this, SLOT(loadStarted()));
|
||||||
connect(m_view, SIGNAL(loadProgress(int)), this, SLOT(loadProgress(int)));
|
connect(m_view, SIGNAL(loadProgress(int)), this, SLOT(loadProgress(int)));
|
||||||
connect(m_view, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished()));
|
connect(m_view, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished()));
|
||||||
|
@ -123,6 +124,14 @@ PopupWindow::PopupWindow(PopupWebView* view)
|
||||||
|
|
||||||
m_locationBar->showUrl(urlToShow);
|
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
|
// Ensuring correct sizes for widgets in layout are calculated even
|
||||||
// before calling QWidget::show()
|
// before calling QWidget::show()
|
||||||
m_layout->invalidate();
|
m_layout->invalidate();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user