From 0102bd8ca3b9d6d6f11137d1119943bd50d68262 Mon Sep 17 00:00:00 2001 From: nowrep Date: Fri, 25 Mar 2011 19:40:03 +0100 Subject: [PATCH] Removed unused CloseButton class --- src/webview/tabbar.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/webview/tabbar.cpp b/src/webview/tabbar.cpp index ee2141f4d..b53787630 100644 --- a/src/webview/tabbar.cpp +++ b/src/webview/tabbar.cpp @@ -20,37 +20,6 @@ #include "qupzilla.h" #include "webtab.h" -class CloseButton : public QToolButton -{ -public: - explicit CloseButton(QWidget* parent ) : QToolButton(parent) { } - -private: - void paintEvent(QPaintEvent *) - { - QPainter p(this); - QStyleOption opt; - opt.init(this); - opt.state |= QStyle::State_AutoRaise; - if (isEnabled() && underMouse() && !isChecked() && !isDown()) - opt.state |= QStyle::State_Raised; - if (isChecked()) - opt.state |= QStyle::State_On; - if (isDown()) - opt.state |= QStyle::State_Sunken; - - if (const QTabBar *tb = qobject_cast(parent())) { - int index = tb->currentIndex(); - QTabBar::ButtonPosition position = (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, tb); - if (tb->tabButton(index, position) == this) - opt.state |= QStyle::State_Selected; - } - - style()->drawPrimitive(QStyle::PE_IndicatorTabClose, &opt, &p, this); - } -}; - - TabBar::TabBar(QupZilla* mainClass, QWidget* parent) : QTabBar(parent) ,p_QupZilla(mainClass)