Add high contrast theme option

pull/12/head
Alex Dima 9 years ago
parent 710ef24847
commit 51f62859ef

@ -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>

@ -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 });
} }

Loading…
Cancel
Save