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: Fix several UI regressions and errors #21707

Merged
merged 10 commits into from
Jan 15, 2024

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Jan 15, 2024

Description of Changes

  • Prevent freeze when switching and moving panes. That was calling findChildren(QTabBar), which takes a long time now (probably due to the new style for special tabbars). To fix that, we call that method with a timer every minute in the main window, which avoids the freeze.
  • Reposition menus so they are correctly aligned both horizontally and vertically. Small glitches were introduced due to our new usage of borders in menus.
  • Make menus associated to extension button toolbars look like a SpyderMenu.
  • Fix double clicks on the Variable Explorer. That was opening two editors per variable.
  • Remove global proxy style because it was interfering with the new style for menus. Instead, apply the styles declared in it on SpyderMenu and SpyderComboBox.
  • Fix setting the same shortcut in different contexts. That allows to use the same local shortcuts in Files and Projects.
  • Reduce min size of comboboxes in Find so they are not shown as collapsed when there's enough space to display them.

Visual changes

Fix incorrect padding of menu items for some menus

This was due to our global proxy style

Before After
imagen imagen

Fix highlight color of current line when selecting different color schemes in Preferences

Before After
syntax-highlighting-wrong syntax-highlighting-right

Make contents area scrollbar background color match its parent's one

Before After
imagen imagen

Make width of Find items be the widget's one if the longest item is shorter than it.

Before After
imagen imagen

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: @ccordoba12

This fixes a visual bug in the Preview editor of the Appearance config
page: when switching themes the current line highlighting was not being
updated.
This makes the scrollbar feel as part of that widget.
It was off by one pixel.
- Prevent showing two editors when doing double clicks in lists,
dataframes, etc.
- Make dialogs be focused after doing double clicks to not force current
users change their muscle memory.
- That was interfering with displaying the right padding for menu items
(don't know why).
- Move the two styles declared on it to their respective widgets. This
also fixes setting up the right icon size for context menus, which was
not working.
- Simplify applying stylesheet to the main window.
@pep8speaks
Copy link

pep8speaks commented Jan 15, 2024

Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 49:1: E402 module level import not at top of file

Comment last updated at 2024-01-15 14:54:37 UTC

Also, fix vertical repositioning on Mac.
This was preventing to set the shortcuts for copy absolute/relative path
in Projects because they are the same ones in Files.
- Reduce min width of its path selection and exclude comboboxes so they
are collapsed at a much smaller size.
- Make its items width be the widget's one if the longest item is
shorter than it.
- Recompute items width when the widget is resized so the UI is rendered
as expected.
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.

2 participants