Qt: Try to fix Main Welcome Interfaces List Scrollbar
Bug: 11733 Change-Id: Ic144634acce7b9e9eb9821ca6452694cb2dcf4dd Reviewed-on: https://code.wireshark.org/review/12684 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
This commit is contained in:
parent
3efb965493
commit
7baac67149
|
@ -50,7 +50,7 @@ AccordionFrame::AccordionFrame(QWidget *parent) :
|
|||
animation_ = new QPropertyAnimation(this, "maximumHeight", this);
|
||||
animation_->setDuration(duration_);
|
||||
animation_->setEasingCurve(QEasingCurve::InOutQuad);
|
||||
connect(animation_, SIGNAL(finished()), this, SLOT(animationFinished()));
|
||||
connect(animation_, SIGNAL(finished()), this, SLOT(animationFinish()));
|
||||
}
|
||||
|
||||
void AccordionFrame::animatedShow()
|
||||
|
@ -98,12 +98,14 @@ void AccordionFrame::animatedHide()
|
|||
}
|
||||
}
|
||||
|
||||
void AccordionFrame::animationFinished()
|
||||
void AccordionFrame::animationFinish()
|
||||
{
|
||||
if (animation_->currentValue().toInt() < 1) {
|
||||
hide();
|
||||
setMaximumHeight(frame_height_);
|
||||
}
|
||||
|
||||
emit animationFinished();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -36,6 +36,7 @@ public:
|
|||
|
||||
signals:
|
||||
void visibilityChanged(bool visible);
|
||||
void animationFinished();
|
||||
|
||||
protected:
|
||||
virtual void hideEvent(QHideEvent *) { emit visibilityChanged(false); }
|
||||
|
@ -46,7 +47,7 @@ private:
|
|||
QPropertyAnimation *animation_;
|
||||
|
||||
private slots:
|
||||
void animationFinished();
|
||||
void animationFinish();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -176,6 +176,8 @@ MainWelcome::MainWelcome(QWidget *parent) :
|
|||
connect(welcome_ui_->captureFilterComboBox, SIGNAL(startCapture()),
|
||||
this, SIGNAL(startCapture()));
|
||||
connect(recent_files_, SIGNAL(itemActivated(QListWidgetItem *)), this, SLOT(openRecentItem(QListWidgetItem *)));
|
||||
connect(welcome_ui_->openFrame, SIGNAL(animationFinished()),
|
||||
welcome_ui_->interfaceTree, SLOT(reset()));
|
||||
updateRecentFiles();
|
||||
|
||||
#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
|
||||
|
@ -317,6 +319,7 @@ void MainWelcome::resizeEvent(QResizeEvent *event)
|
|||
// event->accept();
|
||||
|
||||
QFrame::resizeEvent(event);
|
||||
welcome_ui_->interfaceTree->reset();
|
||||
}
|
||||
|
||||
void MainWelcome::changeEvent(QEvent* event)
|
||||
|
|
Loading…
Reference in New Issue