提交 2f1285a1 编写于 作者: A Alex Dima

Fixes #21740: Keybindings editor's info tooltips are misaligned

上级 0bc62d16
...@@ -179,21 +179,21 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut ...@@ -179,21 +179,21 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut
data.forEach((item) => { data.forEach((item) => {
let msg: MarkedString[]; let msg: MarkedString[];
let className: string; let className: string;
let inlineClassName: string; let beforeContentClassName: string;
let overviewRulerColor: string; let overviewRulerColor: string;
if (!item.label) { if (!item.label) {
// this is the error case // this is the error case
msg = [NLS_KB_LAYOUT_ERROR_MESSAGE]; msg = [NLS_KB_LAYOUT_ERROR_MESSAGE];
className = 'keybindingError'; className = 'keybindingError';
inlineClassName = 'inlineKeybindingError'; beforeContentClassName = 'inlineKeybindingError';
overviewRulerColor = 'rgba(250, 100, 100, 0.6)'; overviewRulerColor = 'rgba(250, 100, 100, 0.6)';
} else { } else {
// this is the info case // this is the info case
msg = [NLS_KB_LAYOUT_INFO_MESSAGE]; msg = [NLS_KB_LAYOUT_INFO_MESSAGE];
msg = msg.concat(this._keybindingService.getLabelFor(item.keybinding)); msg = msg.concat(this._keybindingService.getLabelFor(item.keybinding));
className = 'keybindingInfo'; className = 'keybindingInfo';
inlineClassName = 'inlineKeybindingInfo'; beforeContentClassName = 'inlineKeybindingInfo';
overviewRulerColor = 'rgba(100, 100, 250, 0.6)'; overviewRulerColor = 'rgba(100, 100, 250, 0.6)';
} }
...@@ -202,7 +202,7 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut ...@@ -202,7 +202,7 @@ export class DefineKeybindingController implements editorCommon.IEditorContribut
range: new Range(item.range.startLineNumber, item.range.startColumn, item.range.startLineNumber, item.range.startColumn + 1), range: new Range(item.range.startLineNumber, item.range.startColumn, item.range.startLineNumber, item.range.startColumn + 1),
options: { options: {
stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
inlineClassName: inlineClassName beforeContentClassName: beforeContentClassName
} }
}); });
......
...@@ -277,6 +277,7 @@ export class FoldingController implements IFoldingController { ...@@ -277,6 +277,7 @@ export class FoldingController implements IFoldingController {
iconClicked = true; iconClicked = true;
break; break;
case editorCommon.MouseTargetType.CONTENT_EMPTY: case editorCommon.MouseTargetType.CONTENT_EMPTY:
case editorCommon.MouseTargetType.CONTENT_TEXT:
if (range.isEmpty && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { if (range.isEmpty && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) {
break; break;
} }
......
...@@ -72,7 +72,7 @@ export class CollapsibleRegion { ...@@ -72,7 +72,7 @@ export class CollapsibleRegion {
if (this._isCollapsed) { if (this._isCollapsed) {
return { return {
stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
inlineClassName: 'inline-folded', afterContentClassName: 'inline-folded',
linesDecorationsClassName: 'folding collapsed' linesDecorationsClassName: 'folding collapsed'
}; };
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册