-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dde08a9
commit 2f73a6d
Showing
2 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,8 +124,16 @@ export class SuggestEnabledInput extends Widget implements IThemable { | |
this.stylingContainer = append(parent, $('.suggest-input-container')); | ||
this.placeholderText = append(this.stylingContainer, $('.suggest-input-placeholder', null, options.placeholderText || '')); | ||
|
||
const editorOptions: IEditorOptions = { | ||
...getSimpleEditorOptions(), | ||
...getHTMLInputStyleOptions(ariaLabel), | ||
...{ | ||
iconsInSuggestions: false | ||
This comment has been minimized.
Sorry, something went wrong.
ramya-rao-a
Contributor
|
||
} | ||
}; | ||
|
||
this.inputWidget = instantiationService.createInstance(CodeEditorWidget, this.stylingContainer, | ||
mixinHTMLInputStyleOptions(getSimpleEditorOptions(), ariaLabel), | ||
editorOptions, | ||
{ | ||
contributions: [SuggestController, SnippetController2, ContextMenuController, MenuPreventer], | ||
isSimpleWidget: true, | ||
|
@@ -244,17 +252,20 @@ export class SuggestEnabledInput extends Widget implements IThemable { | |
} | ||
|
||
|
||
function mixinHTMLInputStyleOptions(config: IEditorOptions, ariaLabel?: string): IEditorOptions { | ||
config.fontSize = 13; | ||
config.lineHeight = 22; | ||
config.wordWrap = 'off'; | ||
config.scrollbar.vertical = 'hidden'; | ||
config.roundedSelection = false; | ||
config.ariaLabel = ariaLabel || ''; | ||
config.renderIndentGuides = false; | ||
config.cursorWidth = 1; | ||
config.snippetSuggestions = 'none'; | ||
config.suggest = { filterGraceful: false }; | ||
config.fontFamily = ' -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif'; | ||
return config; | ||
function getHTMLInputStyleOptions(ariaLabel?: string): IEditorOptions { | ||
return <IEditorOptions>{ | ||
fontSize: 13, | ||
lineHeight: 22, | ||
wordWrap: 'off', | ||
scrollbar: { | ||
vertical: 'hidden', | ||
}, | ||
roundedSelection: false, | ||
ariaLabel: ariaLabel || '', | ||
renderIndentGuides: false, | ||
cursorWidth: 1, | ||
snippetSuggestions: 'none', | ||
suggest: { filterGraceful: false }, | ||
fontFamily: ' -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif', | ||
}; | ||
} |
@roblourens I would suggest to have this in
suggest.css
instead. TheiconsInSuggestions
is read by the suggest widget and it adds theno-icons
class as well. It follows that the css rule should live in the suggest widget as well