forked from qt-creator/qt-creator
FancyToolButton: remove forceVisible
It's never used Change-Id: Ia2e7ab19685066daf29b5209cb7ea2a7485dfcf2 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -52,17 +52,10 @@ using namespace Internal;
|
||||
FancyToolButton::FancyToolButton(QWidget *parent)
|
||||
: QToolButton(parent), m_fader(0)
|
||||
{
|
||||
m_hasForceVisible = false;
|
||||
setAttribute(Qt::WA_Hover, true);
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
}
|
||||
|
||||
void FancyToolButton::forceVisible(bool visible)
|
||||
{
|
||||
m_hasForceVisible = true;
|
||||
setVisible(visible);
|
||||
}
|
||||
|
||||
bool FancyToolButton::event(QEvent *e)
|
||||
{
|
||||
switch (e->type()) {
|
||||
@@ -302,10 +295,8 @@ void FancyToolButton::actionChanged()
|
||||
{
|
||||
// the default action changed in some way, e.g. it might got hidden
|
||||
// since we inherit a tool button we won't get invisible, so do this here
|
||||
if (!m_hasForceVisible) {
|
||||
if (QAction* action = defaultAction())
|
||||
setVisible(action->isVisible());
|
||||
}
|
||||
if (QAction* action = defaultAction())
|
||||
setVisible(action->isVisible());
|
||||
}
|
||||
|
||||
FancyActionBar::FancyActionBar(QWidget *parent)
|
||||
|
||||
@@ -57,13 +57,8 @@ public:
|
||||
float fader() { return m_fader; }
|
||||
void setFader(float value) { m_fader = value; update(); }
|
||||
|
||||
void forceVisible(bool visible);
|
||||
|
||||
private slots:
|
||||
void actionChanged();
|
||||
|
||||
private:
|
||||
bool m_hasForceVisible;
|
||||
};
|
||||
|
||||
class FancyActionBar : public QWidget
|
||||
|
||||
Reference in New Issue
Block a user