In certain circumstances the ModalOverlay widget is not sized properly:
On master (f018d0c9cd7f408dac016b6bfc873670de713d27) this bug looks like this:

With this PR the wallet frame looks ok:

utACK f3bac3a1874313796cf2d7acea2d3da74f36a2b0
Unrelated but while we are here you can notice that if the window height is increased while the modal is hiding then it will stay a little visible like:
<img width="949" alt="Screenshot 2020-01-30 at 11 20 42" src="https://user-images.githubusercontent.com/3534524/73445461-9e462d80-4352-11ea-9331-cf45e3cb13a0.png">
because the animation end value doesn't track the new height.
Honestly why not drop the animation and eventually make it a modal dialog instead of being embedded?
Reworked and rebased. @promag
Unrelated but while we are here you can notice that if the window height is increased while the modal is hiding then it will stay a little visible like: ... because the animation end value doesn't track the new height.
Fixed.
45 | @@ -45,6 +46,7 @@ public Q_SLOTS: 46 | QVector<QPair<qint64, double> > blockProcessTime; 47 | bool layerIsVisible; 48 | bool userClosed; 49 | + QPropertyAnimation animation{};
nit, m_animation, m_slide_animation or something like that. Also, could drop {}?
Sure! Going to fix.
52 | @@ -48,6 +53,9 @@ bool ModalOverlay::eventFilter(QObject * obj, QEvent * ev) { 53 | if (!layerIsVisible) 54 | setGeometry(0, height(), width(), height()); 55 | 56 | + if (animation.state() != QAbstractAnimation::Stopped && animation.endValue().toPoint().y()) {
nit, == QPropertyAnimation::Running? Also add > 0 or maybe a comment giving some context.
According to the enum QAbstractAnimation::State docs, state != QAbstractAnimation::Stopped does not imply state == QAbstractAnimation::Running :)
Going to add >0.
We don't pause right? Oh well, just drop it and always update when > 0 🙈
Code review ACK 14f68ecdc22e96011e53b6aea5672c853e2c648b.
Updated 14f68ecdc22e96011e53b6aea5672c853e2c648b -> 4fc1df41d570ab631a8b47e4427a0b84305e37d1 (pr17968.02 -> pr17968.03, diff):
Code review ACK 4fc1df41d570ab631a8b47e4427a0b84305e37d1.
utACK 4fc1df41d570ab631a8b47e4427a0b84305e37d1