Browse Source

Increases contrast of line highlights

Increases the width of the heatmap gutter glyph
Moves gutter glyphs closer to the code
main
Eric Amodio 2 years ago
parent
commit
d992be0f4e
2 changed files with 7 additions and 7 deletions
  1. +3
    -3
      src/annotations/annotations.ts
  2. +4
    -4
      src/annotations/fileAnnotationController.ts

+ 3
- 3
src/annotations/annotations.ts View File

@ -121,19 +121,19 @@ export class Annotations {
if (colorDecoration == null) {
colorDecoration = {
decorationType: window.createTextEditorDecorationType({
backgroundColor: line ? `rgba(${r},${g},${b},${a * 0.08})` : undefined,
backgroundColor: line ? `rgba(${r},${g},${b},${a * 0.15})` : undefined,
opacity: fadeLines ? `${heatmap.computeOpacity(date).toFixed(2)} !important` : undefined,
isWholeLine: line || fadeLines ? true : undefined,
gutterIconPath: gutter
? Uri.parse(
`data:image/svg+xml,${encodeURIComponent(
`<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><rect fill='rgb(${r},${g},${b})' fill-opacity='${a}' x='7' y='0' width='2' height='18'/></svg>`,
`<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><rect fill='rgb(${r},${g},${b})' fill-opacity='${a}' x='15' y='0' width='3' height='18'/></svg>`,
)}`,
)
: undefined,
gutterIconSize: gutter ? 'contain' : undefined,
overviewRulerLane: scrollbar ? OverviewRulerLane.Center : undefined,
overviewRulerColor: scrollbar ? `rgba(${r},${g},${b},${a * 0.5})` : undefined,
overviewRulerColor: scrollbar ? `rgba(${r},${g},${b},${a * 0.7})` : undefined,
}),
rangesOrOptions: [range],
};

+ 4
- 4
src/annotations/fileAnnotationController.ts View File

@ -571,7 +571,7 @@ export class FileAnnotationController implements Disposable {
Decorations.changesLineAddedAnnotation = window.createTextEditorDecorationType({
backgroundColor: locations.includes(ChangesLocations.Line)
? `rgba(${addedColor.join(',')},0.2)`
? `rgba(${addedColor.join(',')},0.4)`
: undefined,
isWholeLine: locations.includes(ChangesLocations.Line) ? true : undefined,
gutterIconPath: locations.includes(ChangesLocations.Gutter)
@ -579,7 +579,7 @@ export class FileAnnotationController implements Disposable {
`data:image/svg+xml,${encodeURIComponent(
`<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><rect fill='rgb(${addedColor.join(
',',
)})' x='13' y='0' width='3' height='18'/></svg>`,
)})' x='15' y='0' width='3' height='18'/></svg>`,
)}`,
)
: undefined,
@ -592,7 +592,7 @@ export class FileAnnotationController implements Disposable {
Decorations.changesLineChangedAnnotation = window.createTextEditorDecorationType({
backgroundColor: locations.includes(ChangesLocations.Line)
? `rgba(${changedColor.join(',')},0.2)`
? `rgba(${changedColor.join(',')},0.4)`
: undefined,
isWholeLine: locations.includes(ChangesLocations.Line) ? true : undefined,
gutterIconPath: locations.includes(ChangesLocations.Gutter)
@ -600,7 +600,7 @@ export class FileAnnotationController implements Disposable {
`data:image/svg+xml,${encodeURIComponent(
`<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><rect fill='rgb(${changedColor.join(
',',
)})' x='13' y='0' width='3' height='18'/></svg>`,
)})' x='15' y='0' width='3' height='18'/></svg>`,
)}`,
)
: undefined,

Loading…
Cancel
Save