@@ -42,7 +42,6 @@ export class FindInput extends Widget {
4242 static readonly OPTION_CHANGE : string = 'optionChange' ;
4343
4444 private contextViewProvider : IContextViewProvider ;
45- private width : number ;
4645 private placeholder : string ;
4746 private validation ?: IInputValidator ;
4847 private label : string ;
@@ -93,7 +92,6 @@ export class FindInput extends Widget {
9392 constructor ( parent : HTMLElement | null , contextViewProvider : IContextViewProvider , private readonly _showOptionButtons : boolean , options : IFindInputOptions ) {
9493 super ( ) ;
9594 this . contextViewProvider = contextViewProvider ;
96- this . width = options . width || 100 ;
9795 this . placeholder = options . placeholder || '' ;
9896 this . validation = options . validation ;
9997 this . label = options . label || NLS_DEFAULT_LABEL ;
@@ -159,13 +157,6 @@ export class FindInput extends Widget {
159157 this . focus ( ) ;
160158 }
161159
162- public setWidth ( newWidth : number ) : void {
163- this . width = newWidth ;
164- this . domNode . style . width = this . width + 'px' ;
165- this . contextViewProvider . layout ( ) ;
166- this . setInputWidth ( ) ;
167- }
168-
169160 public getValue ( ) : string {
170161 return this . inputBox . value ;
171162 }
@@ -240,7 +231,6 @@ export class FindInput extends Widget {
240231
241232 public setCaseSensitive ( value : boolean ) : void {
242233 this . caseSensitive . checked = value ;
243- this . setInputWidth ( ) ;
244234 }
245235
246236 public getWholeWords ( ) : boolean {
@@ -249,7 +239,6 @@ export class FindInput extends Widget {
249239
250240 public setWholeWords ( value : boolean ) : void {
251241 this . wholeWords . checked = value ;
252- this . setInputWidth ( ) ;
253242 }
254243
255244 public getRegex ( ) : boolean {
@@ -258,7 +247,6 @@ export class FindInput extends Widget {
258247
259248 public setRegex ( value : boolean ) : void {
260249 this . regex . checked = value ;
261- this . setInputWidth ( ) ;
262250 this . validate ( ) ;
263251 }
264252
@@ -277,15 +265,8 @@ export class FindInput extends Widget {
277265 dom . addClass ( this . domNode , 'highlight-' + ( this . _lastHighlightFindOptions ) ) ;
278266 }
279267
280- private setInputWidth ( ) : void {
281- let w = this . width - this . caseSensitive . width ( ) - this . wholeWords . width ( ) - this . regex . width ( ) ;
282- this . inputBox . width = w ;
283- this . inputBox . layout ( ) ;
284- }
285-
286268 private buildDomNode ( appendCaseSensitiveLabel : string , appendWholeWordsLabel : string , appendRegexLabel : string , history : string [ ] , flexibleHeight : boolean ) : void {
287269 this . domNode = document . createElement ( 'div' ) ;
288- this . domNode . style . width = this . width + 'px' ;
289270 dom . addClass ( this . domNode , 'monaco-findInput' ) ;
290271
291272 this . inputBox = this . _register ( new HistoryInputBox ( this . domNode , this . contextViewProvider , {
@@ -320,7 +301,6 @@ export class FindInput extends Widget {
320301 if ( ! viaKeyboard && this . fixFocusOnOptionClickEnabled ) {
321302 this . inputBox . focus ( ) ;
322303 }
323- this . setInputWidth ( ) ;
324304 this . validate ( ) ;
325305 } ) ) ;
326306 this . _register ( this . regex . onKeyDown ( e => {
@@ -337,7 +317,6 @@ export class FindInput extends Widget {
337317 if ( ! viaKeyboard && this . fixFocusOnOptionClickEnabled ) {
338318 this . inputBox . focus ( ) ;
339319 }
340- this . setInputWidth ( ) ;
341320 this . validate ( ) ;
342321 } ) ) ;
343322
@@ -351,7 +330,6 @@ export class FindInput extends Widget {
351330 if ( ! viaKeyboard && this . fixFocusOnOptionClickEnabled ) {
352331 this . inputBox . focus ( ) ;
353332 }
354- this . setInputWidth ( ) ;
355333 this . validate ( ) ;
356334 } ) ) ;
357335 this . _register ( this . caseSensitive . onKeyDown ( e => {
@@ -390,7 +368,6 @@ export class FindInput extends Widget {
390368 }
391369 } ) ;
392370
393- this . setInputWidth ( ) ;
394371
395372 let controls = document . createElement ( 'div' ) ;
396373 controls . className = 'controls' ;
0 commit comments