mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 01:37:20 +00:00
* fix #155222. Adjust focus gutter indicator for markup cell. * 💄
This commit is contained in:
parent
a97d84d375
commit
60c53f18dd
1 changed files with 9 additions and 5 deletions
|
@ -81,7 +81,7 @@ export class CellFocusIndicator extends CellPart {
|
|||
this.bottom.domNode.style.transform = `translateY(${indicatorPostion.bottomIndicatorTop}px)`;
|
||||
this.left.setHeight(indicatorPostion.verticalIndicatorHeight);
|
||||
this.right.setHeight(indicatorPostion.verticalIndicatorHeight);
|
||||
this.codeFocusIndicator.setHeight(indicatorPostion.verticalIndicatorHeight);
|
||||
this.codeFocusIndicator.setHeight(indicatorPostion.verticalIndicatorHeight - this.getIndicatorTopMargin() * 2);
|
||||
} else {
|
||||
// code cell
|
||||
const cell = element as CodeCellViewModel;
|
||||
|
@ -99,13 +99,17 @@ export class CellFocusIndicator extends CellPart {
|
|||
}
|
||||
|
||||
private updateFocusIndicatorsForTitleMenu(): void {
|
||||
this.left.domNode.style.transform = `translateY(${this.getIndicatorTopMargin()}px)`;
|
||||
this.right.domNode.style.transform = `translateY(${this.getIndicatorTopMargin()}px)`;
|
||||
}
|
||||
|
||||
private getIndicatorTopMargin() {
|
||||
const layoutInfo = this.notebookEditor.notebookOptions.getLayoutConfiguration();
|
||||
|
||||
if (this.titleToolbar.hasActions) {
|
||||
this.left.domNode.style.transform = `translateY(${layoutInfo.editorToolbarHeight + layoutInfo.cellTopMargin}px)`;
|
||||
this.right.domNode.style.transform = `translateY(${layoutInfo.editorToolbarHeight + layoutInfo.cellTopMargin}px)`;
|
||||
return layoutInfo.editorToolbarHeight + layoutInfo.cellTopMargin;
|
||||
} else {
|
||||
this.left.domNode.style.transform = `translateY(${layoutInfo.cellTopMargin}px)`;
|
||||
this.right.domNode.style.transform = `translateY(${layoutInfo.cellTopMargin}px)`;
|
||||
return layoutInfo.cellTopMargin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue