Browse Source

Stops gutter avatar jumping on blank current line

Caused by a conflict of after elements used for gutter avatar & current line
main
Eric Amodio 4 years ago
parent
commit
36914d0242
2 changed files with 5 additions and 5 deletions
  1. +3
    -3
      src/annotations/annotations.ts
  2. +2
    -2
      src/annotations/gutterBlameAnnotationProvider.ts

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

@ -213,9 +213,9 @@ export class Annotations {
fontStyle: 'normal',
height: '100%',
margin: '0 26px -1px 0',
textDecoration: separateLines
? `overline solid rgba(0, 0, 0, .2);box-sizing:border-box${avatars ? ';padding: 0 0 0 18px' : ''}`
: `none;box-sizing:border-box${avatars ? ';padding: 0 0 0 18px' : ''}`,
textDecoration: `${separateLines ? 'overline solid rgba(0, 0, 0, .2)' : 'none'};box-sizing: border-box${
avatars ? ';padding: 0 0 0 18px' : ''
}`,
width: width,
uncommittedColor: new ThemeColor('gitlens.gutterUncommittedForegroundColor'),
};

+ 2
- 2
src/annotations/gutterBlameAnnotationProvider.ts View File

@ -100,7 +100,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
};
if (separateLines) {
gutter.renderOptions.before!.textDecoration = `none;box-sizing:border-box${
gutter.renderOptions.before!.textDecoration = `none;box-sizing: border-box${
avatars ? ';padding: 0 0 0 18px' : ''
}`;
}
@ -216,7 +216,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
width: '16px',
textDecoration: `none;position:absolute;top:1px;left:5px;background:url(${(
await commit.getAvatarUri({ defaultStyle: gravatarDefault })
).toString()});background-size:16px 16px`,
).toString()});background-size:16px 16px;margin-left: 0 !important`,
};
map.set(commit.email!, avatarDecoration);
}

Loading…
Cancel
Save