infobox style (#23518)

* listbox

* select box

* fix tests

* one more test

* infobox style
This commit is contained in:
Alan Ren
2023-06-28 13:13:41 -07:00
committed by GitHub
parent 6dc1b9b905
commit 699aba4bc6
5 changed files with 32 additions and 59 deletions

View File

@@ -10,6 +10,7 @@ import { ISelectBoxStyles } from 'sql/base/browser/ui/selectBox/selectBox';
import { ITableFilterStyles } from 'sql/base/browser/ui/table/plugins/headerFilter.plugin';
import * as sqlcr from 'sql/platform/theme/common/colorRegistry';
import { disabledCheckboxForeground } from 'sql/platform/theme/common/colors';
import { IInfoBoxStyles } from 'sql/workbench/browser/ui/infoBox/infoBox';
import { IButtonStyles } from 'vs/base/browser/ui/button/button';
import { IStyleOverride, defaultButtonStyles, defaultCountBadgeStyles, defaultInputBoxStyles, defaultListStyles, defaultSelectBoxStyles as vsDefaultSelectBoxStyles, overrideStyles } from 'vs/platform/theme/browser/defaultStyles';
import * as cr from 'vs/platform/theme/common/colorRegistry';
@@ -77,3 +78,10 @@ export const defaultSelectBoxStyles: ISelectBoxStyles = {
inputValidationErrorBackground: cr.asCssVariable(cr.inputValidationErrorBackground),
...vsDefaultSelectBoxStyles
}
export const defaultInfoBoxStyles: IInfoBoxStyles = {
informationBackground: cr.asCssVariable(sqlcr.infoBoxInformationBackground),
warningBackground: cr.asCssVariable(sqlcr.infoBoxWarningBackground),
errorBackground: cr.asCssVariable(sqlcr.infoBoxErrorBackground),
successBackground: cr.asCssVariable(sqlcr.infoBoxSuccessBackground)
};

View File

@@ -57,31 +57,6 @@ export function attachTableStyler(widget: IThemable, themeService: IThemeService
return attachStyler(themeService, { ...defaultTableStyles, ...(style || {}) }, widget);
}
export interface IInfoBoxStyleOverrides {
informationBackground: cr.ColorIdentifier,
warningBackground: cr.ColorIdentifier,
errorBackground: cr.ColorIdentifier,
successBackground: cr.ColorIdentifier
}
export const defaultInfoBoxStyles: IInfoBoxStyleOverrides = {
informationBackground: sqlcr.infoBoxInformationBackground,
warningBackground: sqlcr.infoBoxWarningBackground,
errorBackground: sqlcr.infoBoxErrorBackground,
successBackground: sqlcr.infoBoxSuccessBackground
};
export function attachInfoBoxStyler(widget: IThemable, themeService: IThemeService, style?: IInfoBoxStyleOverrides): IDisposable {
return attachStyler(themeService, { ...defaultInfoBoxStyles, ...style }, widget);
}
export interface IInfoButtonStyleOverrides {
buttonBackground: cr.ColorIdentifier,
buttonForeground: cr.ColorIdentifier,
buttonBorder: cr.ColorIdentifier,
buttonHoverBackground: cr.ColorIdentifier
}
export function attachDesignerStyler(widget: any, themeService: IThemeService): IDisposable {
function applyStyles(): void {
const colorTheme = themeService.getColorTheme();