spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.36k stars 1.62k forks source link

Add bump or threshold in middle of window when moving the slider in a horizontal split left and right #21661

Open PanderMusubi opened 10 months ago

PanderMusubi commented 10 months ago

Issue Report Checklist

Problem Description

When a pane is split horizontically resulting in only two panes next to each other, the user would like to move the split of the two panes exactly in the middle of the window.

What steps reproduce the problem?

  1. Open a file
  2. Split horizontally
  3. Move the pane seperator left and right

What is the expected output? What do you see instead?

User would like to move the pane split exactly to the middle of the window. This is very hard to do with mouse or touch pad to move to the exact middle, pixelwise. A small bump/threshold when moving the pane seperator in the middle of the window will allow the user to do this.

Screenshot from 2023-12-30 11-48-00

Offer this only when the full width of the screen has only one (top level) split (two panes). Additionally, this can also be implemented for a single (top level) vertical split. Here the middle of the available vertical space for the top-level main pane should be used, not the height of the window.

Paste Traceback/Error Below (if applicable)

n/a

Versions

Dependencies

n/a

dalthviz commented 8 months ago

Hi @PanderMusubi thank you for the feedback! So, as a quick idea, maybe you would like some sort of action that you could trigger that would divide the available space between the splitted editors equally?

What do you think about something like this @spyder-ide/core-developers ?

Note: maybe QSplitter.setSizes (https://doc.qt.io/qt-5/qsplitter.html#setSizes) could be useful for something like this

PanderMusubi commented 8 months ago

Yea, that is correct. Implementation I leave go to the core developers.