From 9b921c28e6f67fc64704e005e3e83957321039c4 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 22 Nov 2019 12:25:55 +0100 Subject: [PATCH] Colorpicker CSS updated --- tasmota/xdrv_01_webserver.ino | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index 01360ff55..391831a0f 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -358,7 +358,8 @@ const char HTTP_HEAD_STYLE2[] PROGMEM = ".bgrn:hover{background:#%06x;}" // COLOR_BUTTON_SAVE_HOVER "a{color:#%06x;text-decoration:none;}" // COLOR_BUTTON ".p{float:left;text-align:left;}" - ".q{float:right;text-align:right;}"; + ".q{float:right;text-align:right;}" + ".r{border-radius:0.3em;padding:2px;margin:6px 2px;}"; const char HTTP_HEAD_STYLE3[] PROGMEM = "" @@ -378,18 +379,14 @@ const char HTTP_HEAD_STYLE3[] PROGMEM = const char HTTP_MSG_SLIDER1[] PROGMEM = "
%s%s
" - "
" - "
"; + "
"; const char HTTP_MSG_SLIDER2[] PROGMEM = "
%s%s
" - "
" - "
"; -const char HTTP_MSG_SLIDER3[] PROGMEM = // HUE - "
" - "
"; -const char HTTP_MSG_SLIDER4[] PROGMEM = // SATURATION - "
" - "
"; + "
"; +const char HTTP_MSG_SLIDER_HUE[] PROGMEM = // Hue + "
"; +const char HTTP_MSG_SLIDER_SAT[] PROGMEM = // Saturation + "
"; const char HTTP_MSG_RSTRT[] PROGMEM = "
" D_DEVICE_WILL_RESTART "

"; @@ -1031,10 +1028,8 @@ void HandleRoot(void) uint8_t sat; uint8_t bri; LightGetHSB(&hue, &sat, &bri); - WSContentSend_P(HTTP_MSG_SLIDER3, hue); // hue - char hex_color[10]; - snprintf_P(hex_color, sizeof(hex_color), PSTR("%02X%02X%02X"), Settings.light_color[0], Settings.light_color[1], Settings.light_color[2]); - WSContentSend_P(HTTP_MSG_SLIDER4, hex_color, changeUIntScale(sat, 0, 255, 0, 100)); // saturation + WSContentSend_P(HTTP_MSG_SLIDER_HUE, hue); // Hue + WSContentSend_P(HTTP_MSG_SLIDER_SAT, Settings.light_color[0], Settings.light_color[1], Settings.light_color[2], changeUIntScale(sat, 0, 255, 0, 100)); // Saturation } } #endif // USE_LIGHT