fix gradient (without gradient)

This commit is contained in:
Jakob Ketterl 2019-10-28 20:54:31 +01:00
parent 52ea2e88e9
commit 1638fde181
1 changed files with 2 additions and 1 deletions

View File

@ -196,7 +196,8 @@ function setSquelchSliderBackground(val) {
var relative = (val - min) / (max - min);
// use a brighter color when squelch is open
var color = val >= sliderPosition ? '#22ff2f' : '#008908';
var style = 'linear-gradient(90deg, ' + color + ' ' + relative * 100 + '%, #B6B6B6 ' + (1 - relative) * 100 + '%)';
// we don't use the gradient, but separate the colors discretely using css tricks
var style = 'linear-gradient(90deg, ' + color + ', ' + color + ' ' + relative * 100 + '%, #B6B6B6 ' + relative * 100 + '%)';
$slider.css('--track-background', style);
}