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: Minor layout improvements to the cornet widget of the panes toolbar #15366

Merged

Conversation

jnsebgosselin
Copy link
Member

@jnsebgosselin jnsebgosselin commented Apr 20, 2021

Description of Changes

In this PR, I propose that we make MainCornerWidget inherit from QToolBar instead of QWidget so that we can set more easily a style that is consistent with that of the MainWidgetToolbar .

I also suggest to add a strut to the corner widget so that there is a space between the last item of the MainWidgetToolbar and the first item of the corner widget.

Before

  • there is no space to the left of the spinner
  • the space to the right of the spinner is too large (though it is very subtle)

spinner_spacing_nok

After

spinner_spacing_ok

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: Jean-Sébastien Gosselin

This is to add a spacing between the first element of the corner widget
and the last element of the MainWidgetToolbar.
@ccordoba12 ccordoba12 changed the base branch from master to 5.x April 21, 2021 14:47
@ccordoba12
Copy link
Member

ccordoba12 commented Apr 21, 2021

Thanks a lot for this @jnsebgosselin! There's one detail I'd like to talk about: the shape of the area that contains the spinner is not a square (like for all other widgets in pane toolbars):

imagen

However, I think we could leave it like that because the spinner is not a clickable button.

@isabela-pf, what do you think?

@jnsebgosselin
Copy link
Member Author

jnsebgosselin commented Apr 21, 2021

Thanks a lot for this @jnsebgosselin! There's one detail I'd like to talk about: the shape of the area that contains the spinner is not a square (like for all other widgets in pane toolbars):

You are right. For consistency, it is probably better if the spinner has the same shape as the other buttons.

Then I have concerns that if we threat all toolbar items like that, we are going to "waste" more screen real-estate, but that is another topic entirely.

We will see what @isabela-pf think and I will come up with a solution to set properly the size of the spinner if needed.

@isabela-pf
Copy link
Collaborator

I've been summoned! I agree in an ideal world I would like to have it be the same shape as all other elements in the menu, but I also think we can afford to save the little bit of space here since it is not an interactive area where we need to be considering clickable area. I'm happy with the rectangular space in this case. Thank you for asking!

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.

Thanks @jnsebgosselin!

@ccordoba12 ccordoba12 merged commit b8e46d6 into spyder-ide:5.x Apr 22, 2021
ccordoba12 added a commit that referenced this pull request Apr 22, 2021
@jnsebgosselin jnsebgosselin deleted the panes_cornerwidget_style_improvement branch April 23, 2021 01:12
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.

None yet

3 participants