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

Use the editor font size for the breakpoint widget #83153

Merged
merged 2 commits into from
Oct 23, 2019

Conversation

anirudhrb
Copy link
Contributor

@anirudhrb anirudhrb commented Oct 23, 2019

Today, the breakpoint widget doesn't respect the editor.fontSize
setting. It always has the default font size even the user has increased the
font size for the editor. Modified breakpointWidget.ts to set the
fontSize option as per the setting.

Also fixed the centering of the input by calculating the top margin of the
input container dynamically:

topMargin = (heightOfContainer - lineHeight * numLines) / 2

Tested by increasing the editor font size in settings and verified that the
breakpoint widget respects it. Also tested that a change in the setting
reflects dynamically without having to re-open the widget.

Fixes #78790

Today, the breakpoint widget doesn't respect the `editor.fontSize`
setting. It always has the default font size even the user has increased the
font size for the editor. Modified `breakpointWidget.ts` to set the
`fontSize` option as per the setting.

Also, fixed the centering of the input by calculating the top margin of the
input container dynamically:
> `topMargin = (heightOfContainer - lineHeight * numLines) / 2`
@isidorn
Copy link
Contributor

isidorn commented Oct 23, 2019

@anirudhrb thank you very much for your PR.
I have commented in the code directly. Can you please tackle my comments and once we polish this up we can merge it in.

@isidorn isidorn added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 23, 2019
1. Removed an extra call to centerInputVertically()
2. Removed the margin-top css rule for inputContainer since it is no
   longer required
@isidorn
Copy link
Contributor

isidorn commented Oct 23, 2019

Looks good, thanks for this PR! ☀️ ☀️ ☀️

@isidorn isidorn merged commit 106b22f into microsoft:master Oct 23, 2019
@isidorn isidorn added this to the October 2019 milestone Oct 23, 2019
@anirudhrb anirudhrb deleted the breakpoint_widget_font_size branch October 25, 2019 17:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breakpoint widget should respect editor font size
2 participants