Skip to content

Use the editor font size for the breakpoint widget#83153

Merged
isidorn merged 2 commits intomicrosoft:masterfrom
anirudhrb:breakpoint_widget_font_size
Oct 23, 2019
Merged

Use the editor font size for the breakpoint widget#83153
isidorn merged 2 commits intomicrosoft:masterfrom
anirudhrb:breakpoint_widget_font_size

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
Collaborator

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
@anirudhrb anirudhrb requested a review from isidorn October 23, 2019 14:28
@isidorn
Copy link
Collaborator

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