Skip to content

Commit cdb7b77

Browse files
author
Eric Amodio
committed
FIxes microsoft#107335 - removes hex assumption
1 parent fc76bf3 commit cdb7b77

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/vs/base/browser/ui/dialog/dialog.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ export class Dialog extends Disposable {
277277
if (this.styles) {
278278
const style = this.styles;
279279

280-
const fgColor = style.dialogForeground ? `${style.dialogForeground}` : '';
281-
const bgColor = style.dialogBackground ? `${style.dialogBackground}` : '';
280+
const fgColor = style.dialogForeground;
281+
const bgColor = style.dialogBackground;
282282
const shadowColor = style.dialogShadow ? `0 0px 8px ${style.dialogShadow}` : '';
283283
const border = style.dialogBorder ? `1px solid ${style.dialogBorder}` : '';
284284

@@ -287,8 +287,8 @@ export class Dialog extends Disposable {
287287
}
288288

289289
if (this.element) {
290-
this.element.style.color = fgColor;
291-
this.element.style.backgroundColor = bgColor;
290+
this.element.style.color = fgColor?.toString() ?? '';
291+
this.element.style.backgroundColor = bgColor?.toString() ?? '';
292292
this.element.style.border = border;
293293

294294
if (this.buttonGroup) {
@@ -300,8 +300,8 @@ export class Dialog extends Disposable {
300300
}
301301

302302
if (this.messageDetailElement && fgColor && bgColor) {
303-
const messageDetailColor = Color.fromHex(fgColor).transparent(.9);
304-
this.messageDetailElement.style.color = messageDetailColor.makeOpaque(Color.fromHex(bgColor)).toString();
303+
const messageDetailColor = fgColor.transparent(.9);
304+
this.messageDetailElement.style.color = messageDetailColor.makeOpaque(bgColor).toString();
305305
}
306306

307307
if (this.iconElement) {

0 commit comments

Comments
 (0)