forked from qt-creator/qt-creator
Core: Clean up some ancient, unused code in FancyTabWidget
Change-Id: I4b24522028c8184f39bd05d54644fee0fba3b434 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -48,9 +48,6 @@ using namespace Core;
|
|||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
const int FancyTabBar::m_rounding = 22;
|
|
||||||
const int FancyTabBar::m_textPadding = 4;
|
|
||||||
|
|
||||||
static const int kMenuButtonWidth = 16;
|
static const int kMenuButtonWidth = 16;
|
||||||
|
|
||||||
void FancyTab::fadeIn()
|
void FancyTab::fadeIn()
|
||||||
@@ -81,18 +78,12 @@ FancyTabBar::FancyTabBar(QWidget *parent)
|
|||||||
m_hoverIndex = -1;
|
m_hoverIndex = -1;
|
||||||
m_currentIndex = -1;
|
m_currentIndex = -1;
|
||||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
|
||||||
setStyle(QStyleFactory::create(QLatin1String("windows")));
|
setMinimumWidth(44);
|
||||||
setMinimumWidth(qMax(2 * m_rounding, 40));
|
|
||||||
setAttribute(Qt::WA_Hover, true);
|
setAttribute(Qt::WA_Hover, true);
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
setMouseTracking(true); // Needed for hover events
|
setMouseTracking(true); // Needed for hover events
|
||||||
}
|
}
|
||||||
|
|
||||||
FancyTabBar::~FancyTabBar()
|
|
||||||
{
|
|
||||||
delete style();
|
|
||||||
}
|
|
||||||
|
|
||||||
QSize FancyTabBar::tabSizeHint(bool minimum) const
|
QSize FancyTabBar::tabSizeHint(bool minimum) const
|
||||||
{
|
{
|
||||||
QFont boldFont(font());
|
QFont boldFont(font());
|
||||||
|
@@ -74,7 +74,6 @@ class FancyTabBar : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
FancyTabBar(QWidget *parent = 0);
|
FancyTabBar(QWidget *parent = 0);
|
||||||
~FancyTabBar();
|
|
||||||
|
|
||||||
bool event(QEvent *event);
|
bool event(QEvent *event);
|
||||||
|
|
||||||
@@ -122,8 +121,6 @@ signals:
|
|||||||
void menuTriggered(int index, QMouseEvent *event);
|
void menuTriggered(int index, QMouseEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int m_rounding;
|
|
||||||
static const int m_textPadding;
|
|
||||||
QRect m_hoverRect;
|
QRect m_hoverRect;
|
||||||
int m_hoverIndex;
|
int m_hoverIndex;
|
||||||
int m_currentIndex;
|
int m_currentIndex;
|
||||||
|
Reference in New Issue
Block a user