Не подтверждена Коммит 77430916 создал по автору BeniBenj's avatar BeniBenj
Просмотр файлов

Do not have max height for force position

владелец 7fdad541
......@@ -551,15 +551,15 @@ export class HoverWidget extends Widget implements IHoverWidget {
}
private adjustHoverMaxHeight(target: TargetRect): void {
let maxHeight = this._targetWindow.innerHeight * 0.9;
let maxHeight = this._targetWindow.innerHeight * 0.5;
// When force position is enabled, restrict max height
if (this._forcePosition) {
const padding = (this._hoverPointer ? Constants.PointerSize : 0) + Constants.HoverBorderWidth;
if (this._hoverPosition === HoverPosition.ABOVE) {
maxHeight = Math.min(maxHeight, target.top - padding);
maxHeight = target.top - padding;
} else if (this._hoverPosition === HoverPosition.BELOW) {
maxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);
maxHeight = this._targetWindow.innerHeight - target.bottom - padding;
}
}
......
......@@ -36,6 +36,7 @@ import { StatusBarFocused } from '../../../common/contextkeys.js';
import { Emitter, Event } from '../../../../base/common/event.js';
import { IView } from '../../../../base/browser/ui/grid/grid.js';
import { isManagedHoverTooltipHTMLElement, isManagedHoverTooltipMarkdownString } from '../../../../base/browser/ui/hover/hover.js';
import { HoverPosition } from '../../../../base/browser/ui/hover/hoverWidget.js';
export interface IStatusbarEntryContainer extends IDisposable {
......@@ -167,7 +168,11 @@ class StatusbarPart extends Part implements IStatusbarEntryContainer {
{
persistence: {
hideOnKeyDown: true,
sticky: focus
sticky: focus,
},
position: {
forcePosition: true,
hoverPosition: HoverPosition.ABOVE,
}
}
)));
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать