diff --git a/src/vs/code/electron-browser/issue/issueReporterMain.ts b/src/vs/code/electron-browser/issue/issueReporterMain.ts index 310adb05cc5..597366c80fe 100644 --- a/src/vs/code/electron-browser/issue/issueReporterMain.ts +++ b/src/vs/code/electron-browser/issue/issueReporterMain.ts @@ -42,7 +42,6 @@ import { ILogService, getLogLevel } from 'vs/platform/log/common/log'; import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel'; import { normalizeGitHubIssuesUrl } from 'vs/code/electron-browser/issue/issueReporterUtil'; import { Button } from 'vs/base/browser/ui/button/button'; -import { Color } from 'vs/base/common/color'; const MAX_URL_LENGTH = platform.isWindows ? 2081 : 5400; @@ -90,11 +89,7 @@ export class IssueReporter extends Disposable { extensionsDisabled: this.environmentService.disableExtensions, }); - this.previewButton = new Button(document.getElementById('issue-reporter'), { - buttonBackground: Color.fromHex(configuration.data.styles.buttonBackground), - buttonForeground: Color.fromHex(configuration.data.styles.buttonForeground), - buttonHoverBackground: Color.fromHex(configuration.data.styles.buttonHoverBackground) - }); + this.previewButton = new Button(document.getElementById('issue-reporter')); ipcRenderer.on('issuePerformanceInfoResponse', (event, info) => { this.logService.trace('issueReporter: Received performance data'); @@ -197,6 +192,18 @@ export class IssueReporter extends Disposable { content.push(`::--webkit-scrollbar-thumb:hover { background-color: ${styles.sliderHoverColor}; }`); } + if (styles.buttonBackground) { + content.push(`.monaco-text-button { background-color: ${styles.buttonBackground} !important; }`); + } + + if (styles.buttonForeground) { + content.push(`.monaco-text-button { color: ${styles.buttonForeground} !important; }`); + } + + if (styles.buttonHoverBackground) { + content.push(`.monaco-text-button:hover, monaco-text-button:focus { background-color: ${styles.buttonHoverBackground} !important; }`); + } + styleTag.innerHTML = content.join('\n'); document.head.appendChild(styleTag); document.body.style.color = styles.color; diff --git a/src/vs/platform/issue/common/issue.ts b/src/vs/platform/issue/common/issue.ts index 228bcdfefb1..527a3abc2c3 100644 --- a/src/vs/platform/issue/common/issue.ts +++ b/src/vs/platform/issue/common/issue.ts @@ -11,6 +11,8 @@ import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensio export const IIssueService = createDecorator('issueService'); +// Since data sent through the service is serialized to JSON, functions will be lost, so Color objects +// should not be sent as their 'toString' method will be stripped. Instead convert to strings before sending. export interface WindowStyles { backgroundColor: string; color: string;