mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
[Win] another solution,isChangingTab()
removed from last commit.
This commit is contained in:
parent
c4b98d4a7a
commit
6a4c45c0ad
@ -774,6 +774,7 @@ void QupZilla::loadSettings()
|
||||
m_navigationBar->installEventFilter(this);
|
||||
m_bookmarksToolbar->installEventFilter(this);
|
||||
statusBar()->installEventFilter(this);
|
||||
m_navigationContainer->installEventFilter(this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -2345,9 +2346,7 @@ bool QupZilla::nativeEvent(const QByteArray &eventType, void* _message, long* re
|
||||
|
||||
void QupZilla::applyBlurToMainWindow(bool force)
|
||||
{
|
||||
if (!force && (m_actionShowFullScreen->isChecked()
|
||||
|| !m_usingTransparentBackground
|
||||
|| m_tabWidget->getTabBar()->isChangingTab())) {
|
||||
if (!force && (m_actionShowFullScreen->isChecked() || !m_usingTransparentBackground)) {
|
||||
return;
|
||||
}
|
||||
int topMargin = 0;
|
||||
@ -2389,10 +2388,23 @@ void QupZilla::applyBlurToMainWindow(bool force)
|
||||
bool QupZilla::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
switch (event->type()) {
|
||||
case QEvent::DeferredDelete:
|
||||
case QEvent::Show:
|
||||
case QEvent::Hide:
|
||||
if (object == m_navigationContainer) {
|
||||
m_navigationBar->removeEventFilter(this);
|
||||
m_bookmarksToolbar->removeEventFilter(this);
|
||||
break;
|
||||
}
|
||||
case QEvent::Show:
|
||||
if (object == m_navigationContainer) {
|
||||
m_navigationBar->installEventFilter(this);
|
||||
m_bookmarksToolbar->installEventFilter(this);
|
||||
break;
|
||||
}
|
||||
case QEvent::Resize:
|
||||
case QEvent::DeferredDelete:
|
||||
if (object == m_navigationContainer) {
|
||||
break;
|
||||
}
|
||||
applyBlurToMainWindow();
|
||||
break;
|
||||
default:
|
||||
|
@ -44,7 +44,6 @@ TabBar::TabBar(QupZilla* mainClass, TabWidget* tabWidget)
|
||||
, m_tabWidget(tabWidget)
|
||||
, m_tabPreview(new TabPreview(mainClass, tabWidget))
|
||||
, m_showTabPreviews(false)
|
||||
, m_isChangingTab(false)
|
||||
, m_clickedTab(0)
|
||||
, m_pinnedTabsCount(0)
|
||||
, m_normalTabWidth(0)
|
||||
@ -400,14 +399,13 @@ void TabBar::currentTabChanged(int index)
|
||||
if (!validIndex(index)) {
|
||||
return;
|
||||
}
|
||||
m_isChangingTab = true;
|
||||
|
||||
hideTabPreview(false);
|
||||
|
||||
showCloseButton(index);
|
||||
hideCloseButton(m_tabWidget->lastTabIndex());
|
||||
|
||||
m_tabWidget->currentTabChanged(index);
|
||||
m_isChangingTab = false;
|
||||
}
|
||||
|
||||
void TabBar::bookmarkTab()
|
||||
|
@ -42,7 +42,6 @@ public:
|
||||
int pinnedTabsCount();
|
||||
int normalTabsCount();
|
||||
|
||||
bool isChangingTab() { return m_isChangingTab; }
|
||||
void updatePinnedTabCloseButton(int index);
|
||||
|
||||
void disconnectObjects();
|
||||
@ -106,7 +105,6 @@ private:
|
||||
QTimer* m_tabPreviewTimer;
|
||||
|
||||
bool m_showTabPreviews;
|
||||
bool m_isChangingTab;
|
||||
|
||||
int m_clickedTab;
|
||||
int m_pinnedTabsCount;
|
||||
|
Loading…
Reference in New Issue
Block a user