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

Added support for breakpointWidget to automatically adapt to width wh… #179551

Merged
merged 3 commits into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/vs/workbench/contrib/debug/browser/breakpointWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
this.centerInputVertically();
}

protected override _onWidth(widthInPixel: number): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just call this._onWidth so this isn't duplicating logic? And the other one subtracts 113, I suppose that's for padding?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so what happened to the - 113? Also please call _onLayout from _onWidth, it feels odd to do it the other way to me.

if (typeof this.heightInPx === 'number') {
this._doLayout(this.heightInPx, widthInPixel);
}
}

private createBreakpointInput(container: HTMLElement): void {
const scopedContextKeyService = this.contextKeyService.createScoped(container);
this.toDispose.push(scopedContextKeyService);
Expand Down