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 {
504
504
this . _hoverFocusedKey . set ( false ) ;
505
505
} ) ) ;
506
506
this . _setHoverData ( undefined ) ;
507
+ this . _setMinimumDimensions ( ) ;
507
508
this . _layout ( ) ;
508
509
this . _editor . addContentWidget ( this ) ;
509
510
}
@@ -518,6 +519,15 @@ export class ContentHoverWidget extends ResizableContentWidget {
518
519
return ContentHoverWidget . ID ;
519
520
}
520
521
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
+
521
531
private static _applyDimensions ( container : HTMLElement , width : number | string , height : number | string ) : void {
522
532
const transformedWidth = typeof width === 'number' ? `${ width } px` : width ;
523
533
const transformedHeight = typeof height === 'number' ? `${ height } px` : height ;
You can’t perform that action at this time.
0 commit comments