diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2015-12-05 16:22:09 +0100 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-12-19 12:51:03 +0000 |
commit | 7baac67149a68b66087c5d688dbeda2869485765 (patch) | |
tree | cf4bb19f0b55ea513e5c4ae3283866467dbdc3d7 | |
parent | 3efb965493b00fe1c123137c4e09597b69427344 (diff) |
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>
-rw-r--r-- | ui/qt/accordion_frame.cpp | 6 | ||||
-rw-r--r-- | ui/qt/accordion_frame.h | 3 | ||||
-rw-r--r-- | ui/qt/main_welcome.cpp | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/ui/qt/accordion_frame.cpp b/ui/qt/accordion_frame.cpp index 9a0e7b3559..87d7c31ac4 100644 --- a/ui/qt/accordion_frame.cpp +++ b/ui/qt/accordion_frame.cpp @@ -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(); } /* diff --git a/ui/qt/accordion_frame.h b/ui/qt/accordion_frame.h index 778b86d1d6..ce484ff028 100644 --- a/ui/qt/accordion_frame.h +++ b/ui/qt/accordion_frame.h @@ -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(); }; diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp index 4eb08a17ee..521c2aa6a9 100644 --- a/ui/qt/main_welcome.cpp +++ b/ui/qt/main_welcome.cpp @@ -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) |