* added default font

* updated default font

* added default font size for results grid

* removed literal string
This commit is contained in:
Anthony Dresser 2016-12-01 11:48:33 -08:00 коммит произвёл GitHub
Родитель d6d17d6a04
Коммит 252e1631c2
3 изменённых файлов: 20 добавлений и 3 удалений

Просмотреть файл

@ -396,9 +396,19 @@
},
"mssql.messagesDefaultOpen": {
"type": "boolean",
"description": "true for the messages pane to be open by default; false for closed",
"description": "True for the messages pane to be open by default; false for closed",
"default": true
},
"mssql.resultsFontFamily": {
"type": "string",
"description": "Set the font family for the results grid; set to blank to use the editor font",
"default": "-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,Ubuntu,Droid Sans,sans-serif"
},
"mssql.resultsFontSize": {
"type": "number",
"description": "Set the font size for the results grid; set to blank to use the editor size",
"default": 12
},
"mssql.saveAsCsv": {
"type": "object",
"description": "[Optional] Configuration options for saving results as CSV",

Просмотреть файл

@ -78,9 +78,14 @@ export class SqlOutputContentProvider implements vscode.TextDocumentContentProvi
} catch (e) {
prod = false;
}
let mssqlConfig = self._vscodeWrapper.getConfiguration(Constants.extensionName);
let editorConfig = self._vscodeWrapper.getConfiguration('editor');
let fontfamily = editorConfig.get<string>('fontFamily').split('\'').join('').split('"').join('');
let fontsize = editorConfig.get<number>('fontSize') + 'px';
let extensionFontFamily = mssqlConfig.get<string>(Constants.extConfigResultFontFamily).split('\'').join('').split('"').join('');
let extensionFontSize = mssqlConfig.get<number>(Constants.extConfigResultFontSize);
let fontfamily = extensionFontFamily ?
extensionFontFamily :
editorConfig.get<string>('fontFamily').split('\'').join('').split('"').join('');
let fontsize = extensionFontSize ? extensionFontSize + 'px' : editorConfig.get<number>('fontSize') + 'px';
let fontweight = editorConfig.get<string>('fontWeight');
res.render(path.join(LocalWebService.staticContentPath, Constants.msgContentProviderSqlOutputHtml),
{

Просмотреть файл

@ -216,6 +216,8 @@ export const sqlToolsServiceVersionConfigKey = 'version';
export const sqlToolsServiceDownloadUrlConfigKey = 'downloadUrl';
export const extConfigResultKeys = ['shortcuts', 'messagesDefaultOpen'];
export const extConfigResultFontFamily = 'resultsFontFamily';
export const extConfigResultFontSize = 'resultsFontSize';
export const titleResultsPane = 'Results: {0}';