Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt: Ensure that ModalOverlay is resized properly #17968

Merged
merged 1 commit into from
May 29, 2020

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jan 20, 2020

In certain circumstances the ModalOverlay widget is not sized properly:

On master (f018d0c) this bug looks like this:
DeepinScreenshot_bitcoin-qt_20200120193402

With this PR the wallet frame looks ok:
DeepinScreenshot_bitcoin-qt_20200120195241

Fix #17269
Fix #17967

@fanquake fanquake added the GUI label Jan 20, 2020
@cvengler
Copy link
Contributor

utACK f3bac3a

MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Jan 21, 2020
Copy link
Member

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Screenshot 2020-01-30 at 11 20 42

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?

@hebasto
Copy link
Member Author

hebasto commented Jan 30, 2020

@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...

With this PR?

@promag
Copy link
Member

promag commented Jan 30, 2020

@hebasto here and master. You can check more easily by increasing the animation duration.

@hebasto
Copy link
Member Author

hebasto commented Feb 12, 2020

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.

MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Feb 13, 2020
Copy link
Member

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK 14f68ec.

src/qt/modaloverlay.h Outdated Show resolved Hide resolved
src/qt/modaloverlay.cpp Outdated Show resolved Hide resolved
@hebasto
Copy link
Member Author

hebasto commented Apr 29, 2020

Updated 14f68ec -> 4fc1df4 (pr17968.02 -> pr17968.03, diff):

  • addressed @promag's comments
  • added comment for clarity

@promag
Copy link
Member

promag commented May 4, 2020

Code review ACK 4fc1df4.

@jonasschnelli
Copy link
Contributor

utACK 4fc1df4

@jonasschnelli jonasschnelli merged commit beb3844 into bitcoin:master May 29, 2020
@hebasto hebasto deleted the 20200120-fix-modaloverlay branch May 29, 2020 08:53
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request May 29, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 31, 2020
4fc1df4 qt: Track QEvent::Resize during animation (Hennadii Stepanov)

Pull request description:

  In certain circumstances the `ModalOverlay` widget is not sized properly:
  - bitcoin#17269
  - bitcoin#17967
  - bitcoin#17968 (review)

  On master (f018d0c) this bug looks like this:
  ![DeepinScreenshot_bitcoin-qt_20200120193402](https://user-images.githubusercontent.com/32963518/72748165-298b2a80-3bbf-11ea-810d-2966f08e496a.png)

  With this PR the wallet frame looks ok:
  ![DeepinScreenshot_bitcoin-qt_20200120195241](https://user-images.githubusercontent.com/32963518/72748388-c64dc800-3bbf-11ea-8875-1ba1899b3513.png)

  Fix bitcoin#17269
  Fix bitcoin#17967

ACKs for top commit:
  promag:
    Code review ACK 4fc1df4.
  jonasschnelli:
    utACK 4fc1df4

Tree-SHA512: b5d303fbc139c9383cd22edecba05e51b0d6115631aeb7d4474e973e7250a84019c11c0e41b5200e4d9ab10e17908774b45234317535857dc5314c3c28614ad4
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 25, 2021
Summary:
> In certain circumstances the ModalOverlay widget is not sized properly:
> With this PR the wallet frame looks ok

This is a backport of [[bitcoin/bitcoin#17968 | core#17968]]

Test Plan:
From core#17967

Run with -regtest, generate some blocks (200 in my case), then quit.
Remove rev00000.dat file to trigger an error.
Run with -regtest and in the dialog "Do you want to rebuild the block database now?" click "OK".

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9926
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
5 participants