mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed a visual bug of TabBar on gnome after viewing a flash video
This commit is contained in:
parent
ff4314db25
commit
4c325ed108
@ -60,7 +60,7 @@ ClickToFlash::ClickToFlash(const QUrl &pluginUrl, const QStringList &argumentNam
|
||||
frame->setStyleSheet("QFrame { border: 1px solid #e8e8e8; }");
|
||||
frame->setContentsMargins(0,0,0,0);
|
||||
horizontalLayout_2 = new QHBoxLayout(frame);
|
||||
toolButton = new QToolButton(frame);
|
||||
toolButton = new QToolButton(this);
|
||||
|
||||
//AdBlock
|
||||
AdBlockManager* manager = AdBlockManager::instance();
|
||||
|
@ -125,7 +125,7 @@ QSize TabBar::tabSizeHint(int index) const
|
||||
return size;
|
||||
}
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#if 0
|
||||
void TabBar::tabInserted(int index)
|
||||
{
|
||||
// CloseButton* closeButton = new CloseButton(this);
|
||||
@ -137,35 +137,35 @@ void TabBar::tabInserted(int index)
|
||||
QAbstractButton* button = (QAbstractButton*)tabButton(index, QTabBar::RightSide);
|
||||
if (!button)
|
||||
return;
|
||||
button->setMaximumSize(17,17);
|
||||
button->resize(17,17);
|
||||
}
|
||||
|
||||
void TabBar::showCloseButton(int index)
|
||||
{
|
||||
TabWidget* tabWidget = qobject_cast<TabWidget*>(parentWidget());
|
||||
if (!tabWidget)
|
||||
return;
|
||||
|
||||
WebTab* webTab = qobject_cast<WebTab*>(tabWidget->widget(index));
|
||||
if (webTab && webTab->isPinned())
|
||||
return;
|
||||
|
||||
CloseButton* button = (CloseButton*)tabButton(index, QTabBar::RightSide);
|
||||
if (!button)
|
||||
return;
|
||||
|
||||
button->show();
|
||||
}
|
||||
|
||||
void TabBar::hideCloseButton(int index)
|
||||
{
|
||||
CloseButton* button = (CloseButton*)tabButton(index, QTabBar::RightSide);
|
||||
if (!button)
|
||||
return;
|
||||
button->hide();
|
||||
}
|
||||
#endif
|
||||
|
||||
//void TabBar::showCloseButton(int index)
|
||||
//{
|
||||
// TabWidget* tabWidget = qobject_cast<TabWidget*>(parentWidget());
|
||||
// if (!tabWidget)
|
||||
// return;
|
||||
|
||||
// WebTab* webTab = qobject_cast<WebTab*>(tabWidget->widget(index));
|
||||
// if (webTab && webTab->isPinned())
|
||||
// return;
|
||||
|
||||
// CloseButton* button = (CloseButton*)tabButton(index, QTabBar::RightSide);
|
||||
// if (!button)
|
||||
// return;
|
||||
|
||||
// button->show();
|
||||
//}
|
||||
|
||||
//void TabBar::hideCloseButton(int index)
|
||||
//{
|
||||
// CloseButton* button = (CloseButton*)tabButton(index, QTabBar::RightSide);
|
||||
// if (!button)
|
||||
// return;
|
||||
// button->hide();
|
||||
//}
|
||||
|
||||
void TabBar::updateCloseButton(int index)
|
||||
{
|
||||
QAbstractButton* button = (QAbstractButton*)tabButton(index, QTabBar::RightSide);
|
||||
|
@ -67,9 +67,7 @@ private slots:
|
||||
private:
|
||||
void mouseDoubleClickEvent(QMouseEvent* event);
|
||||
QSize tabSizeHint(int index) const;
|
||||
#ifdef Q_WS_X11
|
||||
void tabInserted(int index);
|
||||
#endif
|
||||
// void tabInserted(int index);
|
||||
|
||||
QupZilla* p_QupZilla;
|
||||
bool m_showCloseButtonWithOneTab;
|
||||
|
@ -106,7 +106,7 @@ TabWidget::TabWidget(QupZilla* mainClass, QWidget* parent) :
|
||||
m_tabBar = new TabBar(p_QupZilla);
|
||||
setTabBar(m_tabBar);
|
||||
setObjectName("tabWidget");
|
||||
setStyleSheet("QTabBar::tab{ max-width:250px; }");
|
||||
setStyleSheet("QTabBar::tab{ max-width:250px; max-height: 28px; }");
|
||||
|
||||
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
|
||||
connect(this, SIGNAL(currentChanged(int)), p_QupZilla, SLOT(refreshHistory()));
|
||||
|
@ -30,12 +30,13 @@ WebTab::WebTab(QupZilla* mainClass, LocationBar* locationBar)
|
||||
,m_pinned(false)
|
||||
{
|
||||
m_layout = new QVBoxLayout(this);
|
||||
setLayout(m_layout);
|
||||
m_layout->setContentsMargins(0,0,0,0);
|
||||
m_layout->setSpacing(0);
|
||||
|
||||
m_view = new WebView(p_QupZilla, this);
|
||||
m_layout->addWidget(m_view);
|
||||
|
||||
setLayout(m_layout);
|
||||
setAutoFillBackground(true); // We don't want this transparent
|
||||
|
||||
connect(m_view, SIGNAL(showNotification(QWidget*)), this, SLOT(showNotification(QWidget*)));
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "progressbar.h"
|
||||
|
||||
WebView::WebView(QupZilla* mainClass, WebTab* webTab)
|
||||
: QWebView()
|
||||
: QWebView(webTab)
|
||||
,p_QupZilla(mainClass)
|
||||
,m_progress(0)
|
||||
,m_isLoading(false)
|
||||
|
Loading…
Reference in New Issue
Block a user