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

Pane resize handle feels too small Linux, Electron fails to update mouse cursor #62320

Closed
shew82 opened this issue Oct 31, 2018 · 25 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron info-needed Issue requires more information from poster layout General VS Code workbench layout issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@shew82
Copy link

shew82 commented Oct 31, 2018

On vscode v1.28.2 (and presumably other versions) there is a very small region to "grab" a pane separate in order to resize the pane (e.g. make integrated terminal smaller, etc). This can make resizing panes very difficult.
resize handle is hard to grab.mkv.zip

Commit: 7f3ce96
Date: 2018-10-17T00:20:56.183Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
OS: Ubuntu 18.04

@isidorn
Copy link
Contributor

isidorn commented Nov 1, 2018

@shew82 Thanks for the video.
@joaomoreno We could increase the default size of the sash to be +1 px.
Not sure how smart it would be to always do that, or we should do it per monitor - does elecetron give us some API so we could figure this out?

@isidorn isidorn added under-discussion Issue is under discussion for relevance, priority, approach layout General VS Code workbench layout issues labels Nov 1, 2018
@joaomoreno
Copy link
Member

Yeah I often hit this too. We currently use 4px for sashes: https://github.com/Microsoft/vscode/blob/master/src/vs/base/browser/ui/sash/sash.css#L19

@isidorn Careful when updating that, there's other measurements on that file which depend on those 4px, so adjustments would need to be made. One idea to improve here would be to use CSS variables and math, or just move everything to JS.

@isidorn
Copy link
Contributor

isidorn commented Nov 1, 2018

@joaomoreno ack. Let's put it to on-deck and debt and when we have time we can tackle it.
Would you go up to 6px, or based on monitor?

@isidorn isidorn added debt Code quality issues and removed under-discussion Issue is under discussion for relevance, priority, approach labels Nov 1, 2018
@isidorn isidorn added this to the On Deck milestone Nov 1, 2018
@joaomoreno
Copy link
Member

joaomoreno commented Nov 1, 2018

You know... there's also another issue: Electron on Linux is pretty bad at updating the mouse cursor, especially in high DPI, known issue. So, often it seems that the cursor isn't over the sash (cause the cursor type doesn't change) when in fact pressing down and dragging would actually resize it.

@shew82 Can you confirm this?

@dwelle
Copy link

dwelle commented Nov 1, 2018

@joaomoreno sometimes happens to me, too (windows 7), but even when not, the sash is too narrow for my liking.

WTBS, couldn't vscode do something like chrome devtools?

image

(the area highlighted in yellow can be dragged to resize → i.e. if there's no button, the whole header acts as a handle)

There's a lot of space for vscode's terminal to do the same:

image

@shew82
Copy link
Author

shew82 commented Nov 1, 2018

You know... there's also another issue: Electron on Linux is pretty bad at updating the mouse cursor, especially in high DPI, known issue. So, often it seems that the cursor isn't over the sash (cause the cursor type doesn't change) when in fact pressing down and dragging would actually resize it.

@shew82 Can you confirm this?

In the video I attached, this actually happens between the 5 and 10 second mark - the pane is resized while the cursor remains an arrow.

@joaomoreno
Copy link
Member

joaomoreno commented Nov 2, 2018

WTBS, couldn't vscode do something like chrome devtools?

Yeah I really like how devtools does that, we could try something like that, what do you think @isidorn?

In the video I attached, this actually happens between the 5 and 10 second mark - the pane is resized while the cursor remains an arrow.

Yeah... it's a sad bug. We should actually check whether Electron 3 fixes it.

@isidorn
Copy link
Contributor

isidorn commented Nov 2, 2018

Yeah, that is a neat idea.
The only downside is that I am not sure we can do this in other places where we use sashes, but looks like an elegant solution for panels.
Should we also do this for viewlet title area to be dragged left / right? Might work imho

@IgorKrupenja
Copy link

I can also reproduce this with with an experimental Electron 3 build. Behaviour is the same basically: the cursor does not change on hovering over the sash but pressing LMB down and dragging would actually resize the pane.

Ubuntu 18.10, GNOME, default cursor theme, scaling set to a factor of 1.5 using xrandr.

VSCode:

Version: 1.30.0-exploration
Commit: 790b0c90a8967f39130084d0bf8e4e299b559413
Date: 2018-11-27T07:36:43.428Z
Electron: 3.0.10
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.18.0-11-generic

@QbicFox
Copy link

QbicFox commented Jan 3, 2019

Same issue here, I'm using ubuntu 18.10 with 200% scaling factor and 3200 * 1800 resolution.

Except small pane resize handle, mouse cursor does not change properly to text in some part of editor.

Version: 1.31.0-exploration
Commit: c6b2329
Date: 2018-12-21T08:38:10.793Z
Electron: 4.0.0
Chrome: 69.0.3497.106
Node.js: 10.11.0
V8: 6.9.427.24-electron.0
OS: Linux x64 4.18.0-13-generic

@SvenTo
Copy link

SvenTo commented Jan 10, 2019

You know... there's also another issue: Electron on Linux is pretty bad at updating the mouse cursor, especially in high DPI, known issue. So, often it seems that the cursor isn't over the sash (cause the cursor type doesn't change) when in fact pressing down and dragging would actually resize it.

@joaomoreno I can confirm this on 200% scaling factor: It is the cursor issue, not the size. I increased the size of the sash to 40px and even that "feels hard to grab." I've made a little demo with the Developer Tools, which shows the problem pretty clear:
demo-2019-01-10_20.03.56.zip

I think it could make sense to increase the size of the sash to 6px. Here is a screenshot with 4px (vertical) and 6px (horizontal):
screenshot_2019-01-10_20-08-40

Version: 1.30.2
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:49:48.319Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Linux x64 4.20.0-arch1-1-ARCH

@mikeseese
Copy link
Contributor

Very curious if there would be a common solution to both this and #65294 where high DPI Linux screens will only render the text cursor on the top left corner of the window within the editor

@mirao
Copy link

mirao commented Jan 20, 2019

I have the same issue with:

  • VSCode 1.30.2
  • Ubuntu 18.10
  • HP Envy Skylake 13.3" 3200x1800, with 200% scale in display settings.

Very hard to catch right position of mouse cursor in edge between windows.

@isidorn
Copy link
Contributor

isidorn commented Jan 21, 2019

fyi @sbatten since you are looking into panel layout these days

@joaomoreno joaomoreno changed the title Pane resize handle is too small on high DPI Linux Pane resize handle feels too small Linux, Electron fails to update mouse cursor Jan 23, 2019
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) electron Issues and items related to Electron and removed debt Code quality issues labels Jan 23, 2019
@joaomoreno joaomoreno modified the milestones: On Deck, Backlog Jan 23, 2019
@paleo
Copy link

paleo commented Feb 6, 2019

Same issue issue on Xubuntu 18.04 (XFCE) and VSCode 1.30.2 with a HiDPI display.

@tomsihap
Copy link

Same issue here https://imgur.com/a/Z8SbOsb

Version: 1.30.2
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:49:48.319Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Linux x64 4.18.0-13-generic

Resolution: 3200x1800px
Scale: 200%

@QbicFox
Copy link

QbicFox commented Feb 12, 2019

In full screen mode everything is ok.

@paleo
Copy link

paleo commented Feb 13, 2019

In full screen mode everything is ok.

That's right, for me too.

@Akiyamka
Copy link

Akiyamka commented Feb 14, 2019

Look like cursor not changing even you under right position
https://www.useloom.com/share/4a2ca406c6604a12be1e094c534c3825

Manjaro Linux x86_64 - 4.19.20-1-MANJARO
Resolution: 3840x2160
DE: GNOME 3.30.2

@QbicFox
Copy link

QbicFox commented Feb 22, 2019

Seems this issue depends on custom title bar functionality ...
If you change title bar style to native in vscode settings you can see everything works as it should.

@hwinkler
Copy link

Seems this issue depends on custom title bar functionality ...
If you change title bar style to native in vscode settings you can see everything works as it should

I confirm this. Maybe VS Code ought not suggest this when you start up native title bar:
"If you experience hard to read text in the menu bar, we recommend trying out the custom title bar."

@sbatten
Copy link
Member

sbatten commented Feb 28, 2019

@hwinkler With the next release, that notification will disappear https://code.visualstudio.com/docs/setup/linux#_using-the-custom-title-bar

@mirao
Copy link

mirao commented Feb 28, 2019

OK, the issue is mentioned in VScode docs.

johananl added a commit to johananl/dotfiles that referenced this issue Mar 1, 2019
@bpasero
Copy link
Member

bpasero commented Oct 18, 2019

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

@bpasero bpasero added the info-needed Issue requires more information from poster label Oct 18, 2019
@vscodebot vscodebot bot closed this as completed Oct 25, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 25, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron info-needed Issue requires more information from poster layout General VS Code workbench layout issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests