Skip to content

Commit

Permalink
If checkbox's default color is not set, use white. (#14742)
Browse files Browse the repository at this point in the history
  • Loading branch information
carolhmj committed Jan 26, 2024
1 parent d3f73d7 commit bd623bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/dev/gui/src/2D/controls/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ export class Checkbox extends Control {
}

if (this._isChecked) {
context.fillStyle = this._isEnabled ? this.color : this._disabledColorItem;
// Color is white if not set
context.fillStyle = this._isEnabled ? (this.color ? this.color : "#ffffff") : this._disabledColorItem;
const offsetWidth = actualWidth * this._checkSizeRatio;
const offsetHeight = actualHeight * this._checkSizeRatio;

Expand Down

0 comments on commit bd623bd

Please sign in to comment.