mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
High contrast theme dashboard fixes (#9874)
* a couple style fixes for high contrast theme * fix for when switching themes
This commit is contained in:
@@ -15,6 +15,7 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work
|
|||||||
import * as themeColors from 'vs/workbench/common/theme';
|
import * as themeColors from 'vs/workbench/common/theme';
|
||||||
import { IColorTheme } from 'vs/platform/theme/common/themeService';
|
import { IColorTheme } from 'vs/platform/theme/common/themeService';
|
||||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||||
|
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||||
|
|
||||||
export const DASHBOARD_SELECTOR: string = 'dashboard-component';
|
export const DASHBOARD_SELECTOR: string = 'dashboard-component';
|
||||||
|
|
||||||
@@ -47,7 +48,8 @@ export class DashboardComponent extends AngularDisposable implements OnInit {
|
|||||||
|
|
||||||
private updateTheme(theme: IColorTheme): void {
|
private updateTheme(theme: IColorTheme): void {
|
||||||
const headerEl = <HTMLElement>this.header.nativeElement;
|
const headerEl = <HTMLElement>this.header.nativeElement;
|
||||||
headerEl.style.borderBottomColor = theme.getColor(themeColors.SIDE_BAR_BACKGROUND, true).toString();
|
const highContrastBorder = theme.getColor(contrastBorder);
|
||||||
|
headerEl.style.borderBottomColor = highContrastBorder ? highContrastBorder.toString() : theme.getColor(themeColors.SIDE_BAR_BACKGROUND, true).toString();
|
||||||
headerEl.style.borderBottomWidth = '1px';
|
headerEl.style.borderBottomWidth = '1px';
|
||||||
headerEl.style.borderBottomStyle = 'solid';
|
headerEl.style.borderBottomStyle = 'solid';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { subscriptionToDisposable } from 'sql/base/browser/lifecycle';
|
|||||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||||
import { DASHBOARD_BORDER } from 'vs/workbench/common/theme';
|
import { DASHBOARD_BORDER } from 'vs/workbench/common/theme';
|
||||||
import { IColorTheme } from 'vs/platform/theme/common/themeService';
|
import { IColorTheme } from 'vs/platform/theme/common/themeService';
|
||||||
|
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||||
|
|
||||||
export interface PropertiesConfig {
|
export interface PropertiesConfig {
|
||||||
properties: Array<Property>;
|
properties: Array<Property>;
|
||||||
@@ -284,7 +285,11 @@ export class PropertiesWidgetComponent extends DashboardWidget implements IDashb
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updateTheme(theme: IColorTheme): void {
|
private updateTheme(theme: IColorTheme): void {
|
||||||
const border = theme.getColor(DASHBOARD_BORDER);
|
if (theme.getColor(contrastBorder)) {
|
||||||
this._container.nativeElement.style.borderBottom = '1px solid ' + border.toString();
|
this._container.nativeElement.style.borderBottom = 'none';
|
||||||
|
} else {
|
||||||
|
const border = theme.getColor(DASHBOARD_BORDER);
|
||||||
|
this._container.nativeElement.style.borderBottom = '1px solid ' + border.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user