@@ -24,8 +24,7 @@ import { SelectionClipboardContributionID } from 'vs/workbench/contrib/codeEdito
24
24
import { getSimpleEditorOptions } from 'vs/workbench/contrib/codeEditor/browser/simpleEditorOptions' ;
25
25
26
26
const enum DIMENSION_DEFAULT {
27
- WIDTH = .6 ,
28
- HEIGHT = 200
27
+ WIDTH = 800
29
28
}
30
29
31
30
export interface IAccessibleContentProvider {
@@ -88,14 +87,15 @@ class AccessibleView extends Disposable {
88
87
quickSuggestions : false ,
89
88
renderWhitespace : 'none' ,
90
89
dropIntoEditor : { enabled : true } ,
91
- readOnly : true
90
+ readOnly : true ,
91
+ fontFamily : 'var(--monaco-monospace-font)'
92
92
} ;
93
93
this . _editorWidget = this . _register ( this . _instantiationService . createInstance ( CodeEditorWidget , this . _editorContainer , editorOptions , codeEditorWidgetOptions ) ) ;
94
94
}
95
95
96
96
show ( provider : IAccessibleContentProvider ) : void {
97
97
const delegate : IContextViewDelegate = {
98
- getAnchor : ( ) => this . _editorContainer ,
98
+ getAnchor : ( ) => { return { x : ( window . innerWidth / 2 ) - ( DIMENSION_DEFAULT . WIDTH / 2 ) , y : ( window . innerHeight / 2 ) - ( this . editorWidget . getContentHeight ( ) / 2 ) } ; } ,
99
99
render : ( container ) => {
100
100
return this . _render ( provider , container ) ;
101
101
} ,
@@ -161,11 +161,7 @@ class AccessibleView extends Disposable {
161
161
}
162
162
163
163
private _layout ( ) : void {
164
- const windowWidth = window . innerWidth ;
165
- const width = windowWidth * DIMENSION_DEFAULT . WIDTH ;
166
- this . _editorWidget . layout ( { width, height : this . _editorWidget . getContentHeight ( ) } ) ;
167
- const left = Math . round ( ( windowWidth - width ) / 2 ) ;
168
- this . _editorContainer . style . left = `${ left } px` ;
164
+ this . _editorWidget . layout ( { width : DIMENSION_DEFAULT . WIDTH , height : this . _editorWidget . getContentHeight ( ) } ) ;
169
165
}
170
166
171
167
private async _getTextModel ( resource : URI ) : Promise < ITextModel | null > {
0 commit comments