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

PR: Prevent first time render glitch by calling position logic via a timer in showEvent (Menus) #22355

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Aug 16, 2024

Description of Changes

Prevent first show glitch for panes option menus:

OS Preview
Windows show_menus_win
Linux show_menus_linux
macOS show_menus_macos

Issue(s) Resolved

Fixes #22266

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: dalthviz

@dalthviz
Copy link
Member Author

/show binder

Copy link

Binder 👈 Launch a Binder instance on this branch

@dalthviz dalthviz marked this pull request as ready for review August 19, 2024 23:43
@dalthviz dalthviz changed the title [WIP] PR: Prevent first time render glitch by overriding show instead of showEvent (Menus) PR: Prevent first time render glitch by overriding show instead of showEvent (Menus) Aug 19, 2024
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

This needs a bit more work @dalthviz (see below).

spyder/api/widgets/menus.py Outdated Show resolved Hide resolved
@dalthviz dalthviz changed the title PR: Prevent first time render glitch by overriding show instead of showEvent (Menus) PR: Prevent first time render glitch by calling position logic via a timer over showEvent (Menus) Aug 20, 2024
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Things are working correctly now, thanks @dalthviz!

A couple of small suggestions to improve comments, then this should be ready.

spyder/api/widgets/menus.py Outdated Show resolved Hide resolved
spyder/api/widgets/menus.py Show resolved Hide resolved
spyder/api/widgets/menus.py Outdated Show resolved Hide resolved
@ccordoba12 ccordoba12 changed the title PR: Prevent first time render glitch by calling position logic via a timer over showEvent (Menus) PR: Prevent first time render glitch by calling position logic via a timer in showEvent (Menus) Aug 20, 2024
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Looks good to me now, thanks @dalthviz!

@ccordoba12 ccordoba12 merged commit 48e5319 into spyder-ide:master Aug 20, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panes options menus not rendering correctly on first trigger
2 participants