File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1616,6 +1616,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
16161616 return this . state . windowBorder ;
16171617 }
16181618
1619+ getWindowBorderWidth ( ) : number {
1620+ return this . state . windowBorder ? 2 : 0 ;
1621+ }
1622+
16191623 getWindowBorderRadius ( ) : string | undefined {
16201624 return this . state . windowBorder && isMacintosh ? '5px' : undefined ;
16211625 }
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ export class HoverWidget extends Widget {
143143 // Get horizontal alignment and position
144144 let targetLeft = this . _target . x !== undefined ? this . _target . x : Math . min ( ...targetBounds . map ( e => e . left ) ) ;
145145 if ( targetLeft + this . _hover . containerDomNode . clientWidth >= document . documentElement . clientWidth ) {
146- this . _x = document . documentElement . clientWidth - ( this . _workbenchLayoutService . hasWindowBorder ( ) ? 3 : 1 ) ;
146+ this . _x = document . documentElement . clientWidth - this . _workbenchLayoutService . getWindowBorderWidth ( ) - 1 ;
147147 this . _hover . containerDomNode . classList . add ( 'right-aligned' ) ;
148148 } else {
149149 this . _x = targetLeft ;
Original file line number Diff line number Diff line change @@ -144,6 +144,11 @@ export interface IWorkbenchLayoutService extends ILayoutService {
144144 */
145145 hasWindowBorder ( ) : boolean ;
146146
147+ /**
148+ * Returns the window border width.
149+ */
150+ getWindowBorderWidth ( ) : number ;
151+
147152 /**
148153 * Returns the window border radius if any.
149154 */
Original file line number Diff line number Diff line change @@ -429,6 +429,7 @@ export class TestLayoutService implements IWorkbenchLayoutService {
429429 hasFocus ( _part : Parts ) : boolean { return false ; }
430430 focusPart ( _part : Parts ) : void { }
431431 hasWindowBorder ( ) : boolean { return false ; }
432+ getWindowBorderWidth ( ) : number { return 0 ; }
432433 getWindowBorderRadius ( ) : string | undefined { return undefined ; }
433434 isVisible ( _part : Parts ) : boolean { return true ; }
434435 getDimension ( _part : Parts ) : Dimension { return new Dimension ( 0 , 0 ) ; }
You can’t perform that action at this time.
0 commit comments