From cdb7b772dee8daeb33dca30201fafac34f946f64 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 25 Sep 2020 16:54:04 -0400 Subject: [PATCH] FIxes #107335 - removes hex assumption --- src/vs/base/browser/ui/dialog/dialog.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/base/browser/ui/dialog/dialog.ts b/src/vs/base/browser/ui/dialog/dialog.ts index 93df3c8f22d..e2b3862aadc 100644 --- a/src/vs/base/browser/ui/dialog/dialog.ts +++ b/src/vs/base/browser/ui/dialog/dialog.ts @@ -277,8 +277,8 @@ export class Dialog extends Disposable { if (this.styles) { const style = this.styles; - const fgColor = style.dialogForeground ? `${style.dialogForeground}` : ''; - const bgColor = style.dialogBackground ? `${style.dialogBackground}` : ''; + const fgColor = style.dialogForeground; + const bgColor = style.dialogBackground; const shadowColor = style.dialogShadow ? `0 0px 8px ${style.dialogShadow}` : ''; const border = style.dialogBorder ? `1px solid ${style.dialogBorder}` : ''; @@ -287,8 +287,8 @@ export class Dialog extends Disposable { } if (this.element) { - this.element.style.color = fgColor; - this.element.style.backgroundColor = bgColor; + this.element.style.color = fgColor?.toString() ?? ''; + this.element.style.backgroundColor = bgColor?.toString() ?? ''; this.element.style.border = border; if (this.buttonGroup) { @@ -300,8 +300,8 @@ export class Dialog extends Disposable { } if (this.messageDetailElement && fgColor && bgColor) { - const messageDetailColor = Color.fromHex(fgColor).transparent(.9); - this.messageDetailElement.style.color = messageDetailColor.makeOpaque(Color.fromHex(bgColor)).toString(); + const messageDetailColor = fgColor.transparent(.9); + this.messageDetailElement.style.color = messageDetailColor.makeOpaque(bgColor).toString(); } if (this.iconElement) { -- GitLab