提交 8986d52c 编写于 作者: B Benjamin Pasero

Better support to use tree background color with contrast border (fixes #26218)

上级 2dd19f6e
......@@ -12,6 +12,7 @@ import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
export interface IPartOptions {
hasTitle?: boolean;
borderWidth?: () => number;
}
/**
......@@ -130,6 +131,10 @@ export class PartLayout {
// Content Size: Width (Fill), Height (Variable)
const contentSize = new Dimension(width, height - titleSize.height);
if (this.options && typeof this.options.borderWidth === 'function') {
contentSize.width -= this.options.borderWidth(); // adjust for border size
}
sizes.push(titleSize);
sizes.push(contentSize);
......
......@@ -63,7 +63,7 @@ export class SidebarPart extends CompositePart<Viewlet> {
Scope.VIEWLET,
SIDE_BAR_TITLE_FOREGROUND,
id,
{ hasTitle: true }
{ hasTitle: true, borderWidth: () => (this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder)) ? 1 : 0 }
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册