@@ -24,8 +24,8 @@ import { getSimpleEditorOptions } from 'vs/workbench/contrib/codeEditor/browser/
24
24
import { IDisposable } from 'xterm' ;
25
25
26
26
const enum DIMENSION_DEFAULT {
27
- WIDTH = .4 ,
28
- HEIGHT = .2
27
+ WIDTH = .6 ,
28
+ HEIGHT = 200
29
29
}
30
30
31
31
export interface IAccessibleContentProvider {
@@ -125,7 +125,6 @@ class AccessibleView extends Disposable {
125
125
model . setLanguage ( provider . options . language ) ;
126
126
}
127
127
container . appendChild ( this . _editorContainer ) ;
128
- this . _layout ( ) ;
129
128
this . _register ( this . _editorWidget . onKeyUp ( ( e ) => {
130
129
if ( e . keyCode === KeyCode . Escape ) {
131
130
this . _contextViewService . hideContextView ( ) ;
@@ -149,13 +148,8 @@ class AccessibleView extends Disposable {
149
148
150
149
private _layout ( ) : void {
151
150
const windowWidth = window . innerWidth ;
152
- const windowHeight = window . innerHeight ;
153
-
154
151
const width = windowWidth * DIMENSION_DEFAULT . WIDTH ;
155
- const height = Math . min ( windowHeight * DIMENSION_DEFAULT . HEIGHT , this . _editorWidget . getContentHeight ( ) ) ;
156
- this . _editorWidget . layout ( { width, height } ) ;
157
- const top = Math . round ( ( windowHeight - height ) / 2 ) ;
158
- this . _editorContainer . style . top = `${ top } px` ;
152
+ this . _editorWidget . layout ( { width, height : this . _editorWidget . getContentHeight ( ) } ) ;
159
153
const left = Math . round ( ( windowWidth - width ) / 2 ) ;
160
154
this . _editorContainer . style . left = `${ left } px` ;
161
155
}
0 commit comments