Adds control over the active line annotation colors

This commit is contained in:
Eric Amodio
2017-04-12 17:06:39 -04:00
parent 04a6574f16
commit 0875cc12d5
4 changed files with 30 additions and 3 deletions

View File

@@ -83,6 +83,10 @@ export class BlameActiveLineController extends Disposable {
this._editor.setDecorations(activeLineDecoration, []);
}
}
if (!Objects.areEquivalent(config.blame.annotation.activeLineDarkColor, this._config && this._config.blame.annotation.activeLineDarkColor) ||
!Objects.areEquivalent(config.blame.annotation.activeLineLightColor, this._config && this._config.blame.annotation.activeLineLightColor)) {
changed = true;
}
this._config = config;
@@ -322,8 +326,17 @@ export class BlameActiveLineController extends Disposable {
hoverMessage: hoverMessage,
renderOptions: {
after: {
color: 'rgba(153, 153, 153, 0.35)',
contentText: annotation
},
dark: {
after: {
color: this._config.blame.annotation.activeLineDarkColor || 'rgba(153, 153, 153, 0.35)'
}
},
light: {
after: {
color: this._config.blame.annotation.activeLineLightColor || 'rgba(153, 153, 153, 0.35)'
}
}
} as DecorationInstanceRenderOptions
} as DecorationOptions;

View File

@@ -19,6 +19,8 @@ export interface IBlameConfig {
dateFormat: string;
message: boolean;
activeLine: 'off' | 'inline' | 'hover' | 'both';
activeLineDarkColor: string;
activeLineLightColor: string;
};
}