Skip to content

Commit 5991aa8

Browse files
committed
UI/GFX improvements
1 parent 9b25b6d commit 5991aa8

File tree

5 files changed

+2244
-2258
lines changed

5 files changed

+2244
-2258
lines changed

wled00/data/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,26 +1306,26 @@ function drawSegmentView() {
13061306

13071307
} // for each segment
13081308

1309-
if (gId("segcont").children.length > 0) { //Only show this if more then one segment
1309+
if (gId("segcont").children.length > 1) { //Only show this if more then one segment
13101310
gId("MD").innerHTML = "total W*H=LC: " + maxWidth + " x " + maxHeight + " = " + maxWidth * maxHeight;
13111311
}
1312-
gId("MD").style.display = gId("segcont").children.length > 0?"inline":"none"
1312+
gId("MD").style.display = gId("segcont").children.length > 1?"inline":"none"
13131313

13141314
function post() {
13151315
for (let p=0; p<gId("segcont").children.length; p++) {
13161316
if (!initSegmentVars(p)) break;
13171317

1318-
if (gId("segcont").children.length>1) { //only show number if more than one segment
1318+
if (gId("segcont").children.length>1) { //only show number and name if more than one segment
13191319
ctx.font = '40px Arial';
13201320
ctx.fillStyle = "orange";
13211321
ctx.fillText(p, topLeftX + pw/2*ppL - 10, topLeftY + ph/2*ppL + 10);
1322+
1323+
//show name of fx
1324+
ctx.font = '20px Arial';
1325+
ctx.fillStyle = "white";
1326+
var name = eJson.find((o)=>{return o.id==fx}).name;
1327+
ctx.fillText(name, topLeftX+10, topLeftY + ph*ppL - 10);
13221328
}
1323-
1324-
//show name of fx
1325-
ctx.font = '20px Arial';
1326-
ctx.fillStyle = "white";
1327-
var name = eJson.find((o)=>{return o.id==fx}).name;
1328-
ctx.fillText(name, topLeftX+10, topLeftY + ph*ppL - 10);
13291329
}
13301330
}
13311331

wled00/data/peek.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ function peek(c, setOff=false) {
2424
if (leds[0] != 76 || leds[1] != 2 || !ctx) return; //'L', set in ws.cpp
2525
let mW = leds[2]; // matrix width
2626
let mH = leds[3]; // matrix height
27-
let pPL = Math.min(c.width / mW, (c.height-10) / mH); // pixels per LED (width of circle) WLEDMM -10 for prompts
27+
let pPL = Math.min(c.width / mW, c.height / mH); // pixels per LED (width of circle)
2828
let lOf = Math.floor((c.width - pPL*mW)/2); //left offeset (to center matrix)
29-
var i = 6;
29+
var i = 4; //same offset as in ws.cpp
3030
ctx.clearRect(0, 0, c.width, c.height); //WLEDMM
3131
function colorAmp(color) {
3232
if (color == 0) return 0;
@@ -39,10 +39,6 @@ function peek(c, setOff=false) {
3939
ctx.fill();
4040
i+=3;
4141
}
42-
//WLEDMM show preset and playlist id
43-
ctx.fillStyle = `rgb(255,255,255)`;
44-
if (leds[4] != 0) ctx.fillText("preset " + leds[4].toString(), lOf, mH*pPL+10);
45-
if (leds[5] != 255) ctx.fillText("playlist " + leds[5].toString(), lOf + 70, mH*pPL+10);
4642
}
4743
} catch (err) {
4844
console.error("Peek WS error:",err);

wled00/html_other.h

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -310,49 +310,44 @@ const uint8_t PAGE_liveviewws2D[] PROGMEM = {
310310

311311

312312
// Autogenerated from wled00/data/peek.js, do not edit!!
313-
const uint16_t PAGE_peekJs_length = 644;
313+
const uint16_t PAGE_peekJs_length = 575;
314314
const uint8_t PAGE_peekJs[] PROGMEM = {
315-
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x75, 0x53, 0xdb, 0x6e, 0xdb, 0x30,
316-
0x0c, 0xfd, 0x95, 0x54, 0x18, 0x52, 0x29, 0x56, 0x15, 0xc7, 0x6d, 0xda, 0xc1, 0xae, 0x17, 0x6c,
317-
0x43, 0x1f, 0x06, 0xec, 0x12, 0x2c, 0x1d, 0xfa, 0x50, 0x04, 0xa8, 0x62, 0xd3, 0x89, 0x57, 0x55,
318-
0x0a, 0x64, 0xe5, 0x62, 0xb8, 0xfe, 0xf7, 0x51, 0xb9, 0xac, 0xdd, 0xb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,
341-
0xb4, 0x50, 0xe1, 0xdc, 0x49, 0xe0, 0x43, 0xe2, 0x78, 0xad, 0x98, 0xb1, 0xe0, 0x0a, 0x0b, 0xe3,
342-
0x88, 0x3d, 0xdb, 0x33, 0x87, 0x7f, 0x33, 0x95, 0xac, 0x55, 0x59, 0xed, 0xb9, 0xc3, 0x3f, 0xb9,
343-
0xc1, 0x55, 0x78, 0xa4, 0xb7, 0x2f, 0x3b, 0x96, 0x19, 0x5d, 0x19, 0x05, 0x02, 0xac, 0xc5, 0x81,
344-
0x91, 0x31, 0x6e, 0x70, 0xe7, 0x6e, 0xd2, 0xd9, 0xb9, 0x31, 0xe1, 0x0e, 0xb1, 0xa6, 0xdb, 0x35,
345-
0xc2, 0x82, 0xcc, 0xeb, 0x89, 0x93, 0x0e, 0x70, 0xd3, 0xee, 0x60, 0x36, 0x31, 0xd9, 0x23, 0x38,
346-
0xf1, 0x6d, 0x7c, 0xf3, 0x75, 0x64, 0x44, 0x05, 0x3a, 0xa7, 0xa4, 0x39, 0x55, 0xeb, 0xd3, 0xd8,
347-
0xd9, 0x15, 0xb4, 0x84, 0xc5, 0xd4, 0xec, 0x96, 0xee, 0x37, 0x96, 0x52, 0xb2, 0x70, 0x6e, 0x59,
348-
0xc5, 0xb8, 0xab, 0x87, 0x65, 0x57, 0x06, 0xfb, 0xc0, 0xfb, 0x17, 0x4b, 0x6b, 0x9c, 0xc9, 0x8c,
349-
0x1a, 0x91, 0x4d, 0x55, 0x91, 0x18, 0xdf, 0x84, 0x05, 0x24, 0xee, 0xf7, 0x49, 0x90, 0x9b, 0x6c,
350-
0xf5, 0x04, 0xda, 0xbd, 0x80, 0x17, 0xa6, 0x72, 0x01, 0xe9, 0x7b, 0x0c, 0x13, 0x46, 0x9b, 0x25,
351-
0xe8, 0x94, 0xb2, 0xf4, 0x5d, 0xf3, 0xcf, 0x3e, 0x5a, 0x6e, 0xc4, 0xac, 0xd4, 0xd2, 0xd6, 0xb7,
352-
0xf5, 0x12, 0xef, 0x40, 0xfa, 0xfd, 0x9f, 0xed, 0xfe, 0x1a, 0xc2, 0x61, 0xe4, 0x95, 0x3d, 0x99,
353-
0x35, 0xdc, 0xac, 0xb1, 0xc6, 0x67, 0x1c, 0x1d, 0x68, 0xc0, 0x39, 0x3c, 0x41, 0x55, 0xc9, 0x39,
354-
0x10, 0xae, 0x59, 0x6c, 0x84, 0xcc, 0xf3, 0xff, 0xc7, 0xdb, 0xf6, 0x17, 0x6a, 0x02, 0xc3, 0x7a,
355-
0x00, 0x04, 0x00, 0x00
315+
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x75, 0x52, 0xc9, 0x6e, 0xdb, 0x30,
316+
0x10, 0xfd, 0x15, 0x85, 0x28, 0x12, 0xd2, 0x62, 0x69, 0x47, 0x89, 0xdb, 0x42, 0x0a, 0x6b, 0xb4,
317+
0x41, 0x0e, 0x05, 0xba, 0x18, 0x75, 0x8b, 0x1c, 0x02, 0x03, 0xa1, 0xa5, 0x91, 0xc5, 0x86, 0x26,
318+
0x0d, 0x6a, 0xbc, 0x08, 0x8a, 0xfe, 0xbd, 0x94, 0xb3, 0x1e, 0xda, 0xcb, 0x70, 0x96, 0x37, 0xcb,
319+
0xe3, 0x4c, 0xb9, 0xb1, 0x39, 0x6a, 0x67, 0xa3, 0x35, 0xc0, 0x1d, 0x05, 0x8e, 0xf2, 0xe8, 0x94,
320+
0xb5, 0x5b, 0xe5, 0x23, 0x2f, 0x41, 0x2c, 0x01, 0x2f, 0x9d, 0x45, 0xd8, 0x23, 0x25, 0x49, 0x41,
321+
0x58, 0xa6, 0x4b, 0xea, 0x1f, 0xc2, 0x2e, 0x43, 0xdf, 0xb4, 0x4e, 0xa2, 0x5b, 0x8b, 0x9d, 0xb6,
322+
0x85, 0xdb, 0x89, 0x5d, 0xdd, 0xe5, 0x0a, 0xf3, 0x8a, 0x02, 0x6b, 0xbb, 0xf2, 0xa9, 0xb0, 0xa5,
323+
0xc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xd6, 0xa7, 0xec, 0x7b, 0xc7, 0xfe, 0x42, 0x67, 0xfb, 0xe0, 0xf0, 0xa2, 0xd4, 0xc6,
335+
0xcc, 0xb0, 0x31, 0x20, 0x6f, 0xfd, 0x72, 0x41, 0xdf, 0xb4, 0x96, 0xaa, 0x1b, 0x37, 0x67, 0x1d,
336+
0x7f, 0x54, 0xe3, 0xd3, 0xd7, 0x46, 0x12, 0x0c, 0x76, 0xcb, 0xbd, 0x58, 0xc0, 0x52, 0xdb, 0x69,
337+
0xe0, 0x43, 0x59, 0xb0, 0x94, 0xcf, 0xe9, 0x7e, 0x60, 0xe2, 0x9a, 0x37, 0x03, 0xc3, 0xc5, 0x79,
338+
0x10, 0x23, 0x9e, 0x0c, 0x0e, 0x7c, 0xa7, 0x5f, 0x7a, 0x44, 0xdf, 0x27, 0x40, 0x5d, 0x2c, 0xcf,
339+
0xba, 0x97, 0x45, 0xe6, 0xce, 0xd6, 0xce, 0x80, 0x00, 0xef, 0xc3, 0x68, 0x64, 0x1a, 0xce, 0x24,
340+
0xba, 0x9e, 0x45, 0x07, 0x33, 0x25, 0x1c, 0x58, 0xd7, 0xb9, 0xe3, 0x63, 0x27, 0x3c, 0xa8, 0xa2,
341+
0x99, 0xa1, 0x42, 0x08, 0xeb, 0xbc, 0x86, 0xc5, 0xcc, 0xe5, 0x77, 0x80, 0xe2, 0xc7, 0xf4, 0xea,
342+
0xfb, 0xc4, 0x89, 0x1a, 0x6c, 0x41, 0x49, 0x7b, 0x62, 0xb6, 0x27, 0x29, 0xfa, 0x0d, 0x74, 0x84,
343+
0xa5, 0xd4, 0x1d, 0x36, 0xfb, 0x8c, 0xa5, 0x94, 0x54, 0x88, 0xeb, 0x3a, 0x0d, 0x07, 0xf1, 0x78,
344+
0x51, 0xc6, 0x85, 0x39, 0xc2, 0x4f, 0x8b, 0xb5, 0x77, 0xe8, 0x72, 0x67, 0x26, 0x64, 0x57, 0xd7,
345+
0x24, 0x0d, 0x92, 0xb0, 0x98, 0xa4, 0xc3, 0x21, 0x89, 0x0b, 0x97, 0x6f, 0x56, 0x60, 0xf1, 0x05,
346+
0x5c, 0xb9, 0x1a, 0x63, 0x32, 0xec, 0x31, 0x4c, 0x38, 0xeb, 0xd6, 0x60, 0x25, 0x65, 0xf2, 0x63,
347+
0xfb, 0xcf, 0x39, 0x3a, 0xee, 0xc4, 0x42, 0x5b, 0xe5, 0x9b, 0x5f, 0xcd, 0x1a, 0x24, 0x51, 0xfd,
348+
0x91, 0x2d, 0x0e, 0xa7, 0x49, 0x38, 0x4e, 0x7a, 0x66, 0x2b, 0xb7, 0x85, 0xab, 0x6d, 0xe8, 0xf1,
349+
0x55, 0xd7, 0x08, 0x16, 0xc2, 0x3f, 0xac, 0xa0, 0xae, 0xd5, 0x12, 0x08, 0xb7, 0x2c, 0x75, 0x42,
350+
0x15, 0xc5, 0xff, 0xe3, 0x5d, 0xf7, 0x17, 0x51, 0xe6, 0x9d, 0x18, 0x65, 0x03, 0x00, 0x00
356351
};
357352

358353

0 commit comments

Comments
 (0)