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 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

This comment has been minimized.

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 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
@anirudhrb anirudhrb requested a review from isidorn Oct 23, 2019
@isidorn

This comment has been minimized.

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
3 of 5 checks passed
3 of 5 checks passed
linux
Details
windows
Details
darwin darwin
Details
VS Code in progress
Details
license/cla All CLA requirements met.
Details
@isidorn isidorn added this to the October 2019 milestone Oct 23, 2019
@anirudhrb anirudhrb deleted the anirudhrb:breakpoint_widget_font_size branch Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.