File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/vs/editor/contrib/hover/browser Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -504,6 +504,7 @@ export class ContentHoverWidget extends ResizableContentWidget {
504504 this . _hoverFocusedKey . set ( false ) ;
505505 } ) ) ;
506506 this . _setHoverData ( undefined ) ;
507+ this . _setMinimumDimensions ( ) ;
507508 this . _layout ( ) ;
508509 this . _editor . addContentWidget ( this ) ;
509510 }
@@ -518,6 +519,15 @@ export class ContentHoverWidget extends ResizableContentWidget {
518519 return ContentHoverWidget . ID ;
519520 }
520521
522+ private _setMinimumDimensions ( ) : void {
523+ const width = 50 ;
524+ const height = this . _editor . getOption ( EditorOption . lineHeight ) + 8 ;
525+ const contentsDomNode = this . _hover . contentsDomNode ;
526+ contentsDomNode . style . minWidth = width + 'px' ;
527+ contentsDomNode . style . minHeight = height + 'px' ;
528+ this . _resizableNode . minSize = new dom . Dimension ( width , height ) ;
529+ }
530+
521531 private static _applyDimensions ( container : HTMLElement , width : number | string , height : number | string ) : void {
522532 const transformedWidth = typeof width === 'number' ? `${ width } px` : width ;
523533 const transformedHeight = typeof height === 'number' ? `${ height } px` : height ;
You can’t perform that action at this time.
0 commit comments