Skip to content

Commit

Permalink
checkbox should update styling when toggle changes (#172098)
Browse files Browse the repository at this point in the history
fixes #170312
checkbox should update styling when toggle changes
  • Loading branch information
sbatten committed Jan 24, 2023
1 parent 144ea81 commit 1aa3559
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vs/base/browser/ui/toggle/toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ export class Checkbox extends Widget {
this.styles = styles;

this.applyStyles();

this._register(this.checkbox.onChange(() => this.applyStyles()));
}

get checked(): boolean {
Expand All @@ -241,6 +243,8 @@ export class Checkbox extends Widget {

set checked(newIsChecked: boolean) {
this.checkbox.checked = newIsChecked;

this.applyStyles();
}

focus(): void {
Expand Down

0 comments on commit 1aa3559

Please sign in to comment.