Add high contrast theme option

This commit is contained in:
Alex Dima 2016-06-20 23:55:52 +02:00
parent 710ef24847
commit 51f62859ef
2 changed files with 3 additions and 2 deletions

View file

@ -81,6 +81,7 @@
<select class="theme-picker"> <select class="theme-picker">
<option>Visual Studio</option> <option>Visual Studio</option>
<option>Visual Studio Dark</option> <option>Visual Studio Dark</option>
<option>High Contrast Dark</option>
</select> </select>
</div> </div>
</div> </div>

View file

@ -35,7 +35,7 @@ $(document).ready(function() {
changeTheme(this.selectedIndex); changeTheme(this.selectedIndex);
}); });
$('.theme-picker').selectpicker({ $('.theme-picker').selectpicker({
size: 2 size: 3
}); });
loadDiffSample(); loadDiffSample();
@ -137,7 +137,7 @@ function loadDiffSample() {
} }
function changeTheme(theme) { function changeTheme(theme) {
var newTheme = (theme === 1 ? 'vs-dark' : 'vs'); var newTheme = (theme === 1 ? 'vs-dark' : ( theme === 0 ? 'vs' : 'hc-black' ));
if (editor) { if (editor) {
editor.updateOptions({ 'theme' : newTheme }); editor.updateOptions({ 'theme' : newTheme });
} }