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
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions spyder/api/widgets/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,9 @@ def __repr__(self):

# ---- Qt methods
# -------------------------------------------------------------------------
def showEvent(self, event):
def show(self):
"""Adjustments when the menu is shown."""
super().show()
if not self._is_shown:
# Reposition submenus vertically due to padding and border
if self._reposition and self._is_submenu:
Expand All @@ -487,8 +488,6 @@ def showEvent(self, event):

self.move(self.pos().x() + delta_x, self.pos().y())

super().showEvent(event)


class PluginMainWidgetOptionsMenu(SpyderMenu):
"""
Expand Down