-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Minor visual glitch when hovering tabs of the Editor. #15398
Comments
Even though it doesn't really cause any visual glitch, I think we the border of the tabs should also be taken into account in the values use for the vertical padding (this becomes apparent though when we add icons to the tabs). So to cover all cases, I think we should have in css['QTabBar::tab'].setValues(
marginTop=self.TOP_MARGIN,
paddingTop='4px',
paddingBottom='4px',
paddingLeft='4px' if is_macos else '10px',
paddingRight='10px' if is_macos else '4px'
)
css['QTabBar::tab:hover'].setValues(
paddingTop='3px',
paddingBottom='3px',
paddingLeft='3px' if is_macos else '9px',
paddingRight='9px' if is_macos else '3px'
)
css['QTabBar::tab:selected'].setValues(
paddingTop='4px',
paddingBottom='3px',
paddingLeft='4px' if is_macos else '10px',
paddingRight='10px' if is_macos else '4px'
)
css['QTabBar::tab:selected:hover'].setValues(
paddingTop='4px',
paddingBottom='3px',
paddingLeft='4px' if is_macos else '10px',
paddingRight='10px' if is_macos else '4px'
) |
HI @jnsebgosselin thanks for reporting this. @dalthviz can you test if this code fixes the issue on Windows so @jnsebgosselin or I can open a PR? |
@juanis2112 @jnsebgosselin I was able to reproduce and the changes proposed seem to work for me 👍 |
@jnsebgosselin, instead of making an entry for each style, you could set |
Oh yeah, nice catch. So I am going to open a PR with these changes against the 5.x branch. |
Thanks @jnsebgosselin! If you do that before the end of the week, it'll be part of 5.0.2 |
Problem Description
There is a little glitch when hovering tabs of the Editor. As we can see in the animation below, the first letter of the tab name gets clipped when the tab is hovered, except when it is selected.
I think that we need to set left and right padding values in the stylesheet that take into account the width of the border when the tabs are in the
hover
state.Adding the following lines :
below the following block in
stylesheet.py
spyder/spyder/utils/stylesheet.py
Lines 265 to 271 in 7f119b2
seems to solve the problem for me.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: