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

Image editor is not centered in Centered Layout #47799

Closed
roblourens opened this issue Apr 13, 2018 · 5 comments
Closed

Image editor is not centered in Centered Layout #47799

roblourens opened this issue Apr 13, 2018 · 5 comments
Assignees
Labels
layout General VS Code workbench layout issues verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

  • Toggle Centered Layout
  • Open an image
  • It is narrow and pushed to the left. Should be centered, or immune to Centered Layout
@isidorn isidorn added the layout General VS Code workbench layout issues label Apr 13, 2018
@isidorn isidorn added this to the April 2018 milestone Apr 13, 2018
@isidorn
Copy link
Contributor

isidorn commented Apr 13, 2018

I have solved this by not centering the binary editor.
@bpasero notice that I have moved all the editor type ids from files.ts to editor.ts
Currently they were spread in those two files which felt a bit shaky to me (I might ahve introduced this initially).
Let me know if you do not like them in editor.ts and we can figure out a different way to determine the type of an editor.

@bpasero
Copy link
Member

bpasero commented Apr 16, 2018

@isidorn the preferences, file and binary file editor are being contributed to the workbench from vs/workbench/parts. Moving knowledge of them into editor.ts (which is a core workbench piece) is a layer breaker we should try to avoid. The following IDs should move out again:

  • PREFERENCES_EDITOR_ID
  • TEXT_FILE_EDITOR_ID
  • FILE_EDITOR_INPUT_ID
  • BINARY_FILE_EDITOR_ID

If we need to check on some property to decide to do something (like centering or not), we could have another method on editor input similar to supportsSplitEditor to answer that.

@isidorn
Copy link
Contributor

isidorn commented Apr 16, 2018

@bpasero makes sense. I have made the changes to move this back into it's appropraite layer, however now I seem to be hitting the following issue

  1. Open an editor, go into center mode
  2. Open preferences editor
  3. Layout is called -> I need to figure out if I should center, however the preferences editor still does not have input asociated with it - it is null. Thus I can not ask the input if it supports centered editor

@bpasero
Copy link
Member

bpasero commented Apr 16, 2018

@isidorn you could also move this method to the BaseEditor

@isidorn
Copy link
Contributor

isidorn commented Apr 16, 2018

@bpasero yeah. Tackled via 96a741d

@roblourens roblourens added the verified Verification succeeded label Apr 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
layout General VS Code workbench layout issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants