Improving themes.
This commit is contained in:
parent
8da00acd8e
commit
eaab180288
|
|
@ -29,8 +29,7 @@
|
|||
.openwebrx-button-brown
|
||||
{
|
||||
background-color: #270700;
|
||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.0, #270700), color-stop(1, #3F1F00) );
|
||||
background: -moz-linear-gradient( center top, #270700 0%, #3F1F00 100% );
|
||||
background: linear-gradient(to bottom, #270700 0%, #3F1F00 100%);
|
||||
}
|
||||
|
||||
.openwebrx-panel-red
|
||||
|
|
@ -41,8 +40,7 @@
|
|||
.openwebrx-button-red
|
||||
{
|
||||
background-color: #270000;
|
||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.0, #270000), color-stop(1, #3F0000) );
|
||||
background: -moz-linear-gradient( center top, #270000 0%, #3F0000 100% );
|
||||
background: linear-gradient(to bottom, #270000 0%, #3F0000 100%);
|
||||
}
|
||||
|
||||
.openwebrx-panel-green
|
||||
|
|
@ -53,8 +51,7 @@
|
|||
.openwebrx-button-green
|
||||
{
|
||||
background-color: #001700;
|
||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.0, #001700), color-stop(1, #002F00) );
|
||||
background: -moz-linear-gradient( center top, #001700 0%, #002F00 100% );
|
||||
background: linear-gradient(to bottom, #001700 0%, #002F00 100%);
|
||||
}
|
||||
|
||||
.openwebrx-panel-khaki
|
||||
|
|
@ -65,8 +62,7 @@
|
|||
.openwebrx-button-khaki
|
||||
{
|
||||
background-color: #171F07;
|
||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.0, #171F07), color-stop(1, #272F17) );
|
||||
background: -moz-linear-gradient( center top, #171F07 0%, #272F17 100% );
|
||||
background: linear-gradient(to bottom, #171F07 0%, #272F17 100%);
|
||||
}
|
||||
|
||||
.openwebrx-panel-blue
|
||||
|
|
@ -77,8 +73,7 @@
|
|||
.openwebrx-button-blue
|
||||
{
|
||||
background-color: #000027;
|
||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.0, #000027), color-stop(1, #00003F) );
|
||||
background: -moz-linear-gradient( center top, #000027 0%, #00003F 100% );
|
||||
background: linear-gradient(to bottom, #000027 0%, #00003F 100%);
|
||||
}
|
||||
|
||||
.openwebrx-panel-navy
|
||||
|
|
@ -89,6 +84,5 @@
|
|||
.openwebrx-button-navy
|
||||
{
|
||||
background-color: #001727;
|
||||
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.0, #001727), color-stop(1, #002F3F) );
|
||||
background: -moz-linear-gradient( center top, #001727 0%, #002F3F 100% );
|
||||
background: linear-gradient(to bottom, #001727 0%, #002F3F 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ var tuning_step = 1;
|
|||
var nr_enabled = false;
|
||||
var nr_threshold = 0;
|
||||
var swap_wheel = false;
|
||||
var ui_theme = "default";
|
||||
|
||||
function updateVolume() {
|
||||
audioEngine.setVolume(parseFloat($("#openwebrx-panel-volume").val()) / 100);
|
||||
|
|
@ -1142,7 +1143,8 @@ function on_ws_recv(evt) {
|
|||
}
|
||||
|
||||
if ('ui_scheme' in config) {
|
||||
set_ui_scheme(config['ui_scheme']);
|
||||
ui_scheme = config['ui_scheme'];
|
||||
set_ui_scheme(ui_scheme);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -1241,6 +1243,7 @@ function on_ws_recv(evt) {
|
|||
break;
|
||||
case 'modes':
|
||||
Modes.setModes(json['value']);
|
||||
set_ui_scheme(ui_scheme);
|
||||
break;
|
||||
default:
|
||||
console.warn('received message of unknown type: ' + json['type']);
|
||||
|
|
@ -2028,14 +2031,17 @@ function set_ui_scheme(theme) {
|
|||
const themes = ['brown', 'red', 'green', 'khaki', 'blue', 'navy'];
|
||||
var $panels = $('.openwebrx-panel');
|
||||
var $buttons = $('.openwebrx-button');
|
||||
var $lists = $('.openwebrx-panel select');
|
||||
|
||||
themes.forEach(function(theme) {
|
||||
$panels.removeClass('openwebrx-panel-' + theme);
|
||||
$buttons.removeClass('openwebrx-button-' + theme);
|
||||
$lists.removeClass('openwebrx-button-' + theme);
|
||||
});
|
||||
|
||||
if (theme && (theme != '') && (theme != 'default')) {
|
||||
$panels.addClass('openwebrx-panel-' + theme);
|
||||
$buttons.addClass('openwebrx-button-' + theme);
|
||||
$lists.addClass('openwebrx-button-' + theme);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue