1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 12:55:14 +03:00

tweaks to dark theme

This commit is contained in:
Kyle K 2019-06-28 07:14:24 +00:00
parent 26a0a50d2a
commit 01b1609758
8 changed files with 87 additions and 20 deletions

View file

@ -252,11 +252,19 @@ GUI_control.prototype.tab_switch_cleanup = function (callback) {
GUI_control.prototype.switchery = function() {
$('.togglesmall').each(function(index, elem) {
var switchery = new Switchery(elem, {
size: 'small',
color: '#ffbb00',
secondaryColor: '#c4c4c4'
});
if(DarkTheme.configEnabled) {
var switchery = new Switchery(elem, {
size: 'small',
color: '#ffbb00',
secondaryColor: '#858585'
});
} else {
var switchery = new Switchery(elem, {
size: 'small',
color: '#ffbb00',
secondaryColor: '#c4c4c4'
});
}
$(elem).on("change", function (evt) {
switchery.setPosition();
});
@ -264,10 +272,17 @@ GUI_control.prototype.switchery = function() {
});
$('.toggle').each(function(index, elem) {
var switchery = new Switchery(elem, {
color: '#ffbb00',
secondaryColor: '#c4c4c4'
});
if(DarkTheme.configEnabled) {
var switchery = new Switchery(elem, {
color: '#ffbb00',
secondaryColor: '#858585'
});
} else {
var switchery = new Switchery(elem, {
color: '#ffbb00',
secondaryColor: '#c4c4c4'
});
}
$(elem).on("change", function (evt) {
switchery.setPosition();
});
@ -275,11 +290,19 @@ GUI_control.prototype.switchery = function() {
});
$('.togglemedium').each(function(index, elem) {
var switchery = new Switchery(elem, {
className: 'switcherymid',
color: '#ffbb00',
secondaryColor: '#c4c4c4'
});
if(DarkTheme.configEnabled) {
var switchery = new Switchery(elem, {
className: 'switcherymid',
color: '#ffbb00',
secondaryColor: '#858585'
});
} else {
var switchery = new Switchery(elem, {
className: 'switcherymid',
color: '#ffbb00',
secondaryColor: '#c4c4c4'
});
}
$(elem).on("change", function (evt) {
switchery.setPosition();
});