Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] CodeEdit change font size

Hi,

I’d like to change the font size in the codeEdit widget. Is there a central function to do that properly? Right now I’m working around that by changing the style settings by jQuery:

$('.textview, .textviewTooltip, .contentassist').css('font-size', fontSize + 'px');
$('.textview').css('line-height', (fontSize*1.2) + 'px‘);
$('.contentassist').css('line-height', lineHeight + 'px');
$('.contentassist').css('width', width + 'px');
$('.contentassist').css('height', height + 'px');

and then ‚refreshing‘ the editor using editor.setText(editor.getText()).

However, this results in some ugly artifacts. Especially the second line breaks the zoom ruler, but without it, the lines get smushed in IE11. For the refresh I also tried using editor.getTextView().redraw(), but that causes the line numbers to look ugly.

Thanks and regards,
Sebastian



Back to the top