From 2c9eea4ce63123df4bba0e2eaa7f4af741288a2d Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sun, 8 Jan 2023 01:54:37 -0300 Subject: [PATCH 01/21] rotation working, broke scale Signed-off-by: Victor Seiji Hariki --- index.html | 4 +- js/config.js | 10 ++ js/ui/tool/select.js | 369 ++++++++++++++++++++++++++++++------------- 3 files changed, 267 insertions(+), 116 deletions(-) diff --git a/index.html b/index.html index dcbf766..e084746 100644 --- a/index.html +++ b/index.html @@ -353,7 +353,7 @@ type="text/javascript"> - + @@ -379,7 +379,7 @@ src="js/ui/tool/colorbrush.js?v=8acb4f6" type="text/javascript"> - + @@ -349,11 +350,11 @@ - + @@ -368,7 +369,7 @@ @@ -379,7 +380,7 @@ src="js/ui/tool/colorbrush.js?v=8acb4f6" type="text/javascript"> + - + @@ -349,7 +350,7 @@ @@ -368,15 +369,15 @@ - + diff --git a/js/initalize/layers.populate.js b/js/initalize/layers.populate.js index 9efd861..66a1a4b 100644 --- a/js/initalize/layers.populate.js +++ b/js/initalize/layers.populate.js @@ -65,12 +65,6 @@ uiCanvas.width = uiCanvas.clientWidth; uiCanvas.height = uiCanvas.clientHeight; const uiCtx = uiCanvas.getContext("2d", {desynchronized: true}); -/** @type {HTMLCanvasElement} */ -const uiDebugCanvas = document.getElementById("layer-debug-overlay"); // where mouse cursor renders -uiDebugCanvas.width = uiDebugCanvas.clientWidth; -uiDebugCanvas.height = uiDebugCanvas.clientHeight; -const uiDebugCtx = uiDebugCanvas.getContext("2d", {desynchronized: true}); - /** * Here we setup canvas dynamic scaling */ @@ -166,68 +160,54 @@ debugLayer.hide(); // Hidden by default * The global viewport object (may be modularized in the future). All * coordinates given are of the center of the viewport * - * cx and cy are the viewport's world coordinates. + * cx and cy are the viewport's world coordinates, scaled to zoom level. + * _x and _y are actual coordinates in the DOM space * * The transform() function does some transforms and writes them to the * provided element. */ const viewport = { - cx: 0, - cy: 0, + get cx() { + return this._x * this.zoom; + }, + + set cx(v) { + return (this._x = v / this.zoom); + }, + _x: 0, + get cy() { + return this._y * this.zoom; + }, + set cy(v) { + return (this._y = v / this.zoom); + }, + _y: 0, zoom: 1, rotation: 0, get w() { - return window.innerWidth * 1; + return (window.innerWidth * 1) / this.zoom; }, get h() { - return window.innerHeight * 1; + return (window.innerHeight * 1) / this.zoom; }, viewToCanvas(x, y) { - return this.matrix.transformPoint({x, y}); return { x: this.cx + this.w * (x / window.innerWidth - 0.5), y: this.cy + this.h * (y / window.innerHeight - 0.5), }; }, canvasToView(x, y) { - return this.imatrix.transformPoint({x, y}); return { x: window.innerWidth * ((x - this.cx) / this.w) + window.innerWidth / 2, y: window.innerHeight * ((y - this.cy) / this.h) + window.innerHeight / 2, }; }, - - /** - * The transformation matrix (vp to world) - * - * @type {DOMMatrix} - */ - get matrix() { - const matrix = new DOMMatrix(); - - matrix.scaleSelf(1 / this.zoom); - matrix.translateSelf(this.cx - this.w / 2, this.cy - this.h / 2); - - return matrix; - }, - - /** - * The transformation matrix (world to vp) - * - * @type {DOMMatrix} - */ - get imatrix() { - return this.matrix.invertSelf(); - }, - /** * Apply transformation * * @param {HTMLElement} el Element to apply CSS transform to */ transform(el) { - el.style.transform = this.imatrix; - return; el.style.transformOrigin = `${this.cx}px ${this.cy}px`; el.style.transform = `scale(${this.zoom}) translate(${-( this._x - @@ -236,8 +216,8 @@ const viewport = { }, }; -//viewport.cx = imageCollection.size.w / 2; -//viewport.cy = imageCollection.size.h / 2; +viewport.cx = imageCollection.size.w / 2; +viewport.cy = imageCollection.size.h / 2; let worldInit = null; @@ -340,8 +320,8 @@ const cameraPaintStart = (evn) => { const cameraPaint = (evn) => { if (worldInit) { - viewport.cx = worldInit.x + (evn.ix - evn.x); - viewport.cy = worldInit.y + (evn.iy - evn.y); + viewport.cx = worldInit.x + (evn.ix - evn.x) / viewport.zoom; + viewport.cy = worldInit.y + (evn.iy - evn.y) / viewport.zoom; // Limits viewport.cx = Math.max( @@ -357,6 +337,13 @@ const cameraPaint = (evn) => { } viewport.transform(imageCollection.element); + if (global.debug) { + debugCtx.clearRect(0, 0, debugCanvas.width, debugCanvas.height); + debugCtx.fillStyle = "#F0F"; + debugCtx.beginPath(); + debugCtx.arc(viewport.cx, viewport.cy, 5, 0, Math.PI * 2); + debugCtx.fill(); + } }; const cameraPaintEnd = (evn) => { From 487f3bed0c78180804dc1fa3e227936c6252feff Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Tue, 10 Jan 2023 14:30:09 -0300 Subject: [PATCH 05/21] implements #164 Signed-off-by: Victor Seiji Hariki --- index.html | 2 +- js/ui/tool/dream.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 2494d65..aa35115 100644 --- a/index.html +++ b/index.html @@ -371,7 +371,7 @@ src="js/ui/tool/generic.js?v=2bcd36d" type="text/javascript"> - + diff --git a/js/ui/tool/dream.js b/js/ui/tool/dream.js index daa0670..3713d0a 100644 --- a/js/ui/tool/dream.js +++ b/js/ui/tool/dream.js @@ -775,6 +775,20 @@ const _generate = async (endpoint, request, bb, options = {}) => { }); imageSelectMenu.appendChild(resourcebtn); + const deletebtn = document.createElement("button"); + deletebtn.textContent = "D"; + deletebtn.title = "Delete Image"; + deletebtn.addEventListener("click", async () => { + images.splice(at, 1); + seeds.splice(at, 1); + + at = Math.min(at, images.length - 1); + + imageindextxt.textContent = `${at}/${images.length - 1}`; + redraw(); + }); + imageSelectMenu.appendChild(deletebtn); + const savebtn = document.createElement("button"); savebtn.textContent = "S"; savebtn.title = "Download image to computer"; From d7e20f87dc8783d2a2aab1f7caacfb8e994f2549 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Wed, 11 Jan 2023 00:36:14 -0300 Subject: [PATCH 06/21] putting back selection 1 Signed-off-by: Victor Seiji Hariki --- index.html | 6 ++-- js/lib/util.js | 5 +++ js/ui/tool/generic.js | 59 ++++++++++++++++++++++++++++------- js/ui/tool/select.js | 71 ++++++++++++++++++++++++++++++++++--------- 4 files changed, 113 insertions(+), 28 deletions(-) diff --git a/index.html b/index.html index 0462b61..e608e25 100644 --- a/index.html +++ b/index.html @@ -341,7 +341,7 @@ - + @@ -370,7 +370,7 @@ @@ -381,7 +381,7 @@ src="js/ui/tool/colorbrush.js?v=3f8c01a" type="text/javascript"> - + - + @@ -370,7 +370,7 @@ @@ -381,7 +381,7 @@ src="js/ui/tool/colorbrush.js?v=3f8c01a" type="text/javascript"> - + @@ -370,7 +370,7 @@ @@ -381,7 +381,7 @@ src="js/ui/tool/colorbrush.js?v=3f8c01a" type="text/javascript"> + From e198cf9af4967b25063d5236ecccd123ff99d5a4 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Thu, 12 Jan 2023 23:00:34 -0300 Subject: [PATCH 12/21] allow stamp rotation(drag) and scaling(wheel) also adds shift as a 'finetune' for wheel. works for dream and stamp. if shift is pressed, wheel will scale slower (not snapping to 128 for dream, or 0.1 for stamp) Signed-off-by: Victor Seiji Hariki --- index.html | 8 +-- js/config.js | 14 ++--- js/ui/tool/dream.js | 18 +++++- js/ui/tool/select.js | 2 +- js/ui/tool/stamp.js | 142 ++++++++++++++++++++++++++++++++++++------- 5 files changed, 147 insertions(+), 37 deletions(-) diff --git a/index.html b/index.html index 49b4fb5..7795d08 100644 --- a/index.html +++ b/index.html @@ -355,7 +355,7 @@ type="text/javascript"> - + @@ -373,7 +373,7 @@ src="js/ui/tool/generic.js?v=f5ad9d7" type="text/javascript"> - + @@ -381,9 +381,9 @@ src="js/ui/tool/colorbrush.js?v=3f8c01a" type="text/javascript"> - + diff --git a/js/config.js b/js/config.js index 8133dab..5f55a75 100644 --- a/js/config.js +++ b/js/config.js @@ -25,15 +25,15 @@ const config = makeReadOnly( rotationSnappingDistance: (10 * Math.PI) / 180, // Rotation Snapping Angles rotationSnappingAngles: [ + (-Math.PI * 4) / 4, + (-Math.PI * 3) / 4, + (-Math.PI * 2) / 4, + (-Math.PI * 1) / 4, 0, - Math.PI / 4, - Math.PI / 2, + (Math.PI * 1) / 4, + (Math.PI * 2) / 4, (Math.PI * 3) / 4, - Math.PI, - (Math.PI * 5) / 4, - (Math.PI * 6) / 4, - (Math.PI * 7) / 4, - Math.PI * 2, + (Math.PI * 4) / 4, ], // Endpoint diff --git a/js/ui/tool/dream.js b/js/ui/tool/dream.js index bfab2c5..c90e022 100644 --- a/js/ui/tool/dream.js +++ b/js/ui/tool/dream.js @@ -1255,10 +1255,16 @@ const _dream_onwheel = (evn, state) => { return; } - // A simple but (I hope) effective fix for mouse wheel behavior - _dream_wheel_accum += evn.delta; + let delta = evn.delta; + if (evn.evn.shiftKey) delta *= 0.01; - if (Math.abs(_dream_wheel_accum) > config.wheelTickSize) { + // A simple but (I hope) effective fix for mouse wheel behavior + _dream_wheel_accum += delta; + + if ( + !evn.evn.shiftKey && + Math.abs(_dream_wheel_accum) > config.wheelTickSize + ) { // Snap to next or previous position const v = state.cursorSize - @@ -1267,6 +1273,12 @@ const _dream_onwheel = (evn, state) => { state.cursorSize = state.setCursorSize(v + snap(v, 0, 128)); state.mousemovecb(evn); + _dream_wheel_accum = 0; // Zero accumulation + } else if (evn.evn.shiftKey && Math.abs(_dream_wheel_accum) >= 1) { + const v = state.cursorSize - _dream_wheel_accum; + state.cursorSize = state.setCursorSize(v); + state.mousemovecb(evn); + _dream_wheel_accum = 0; // Zero accumulation } }; diff --git a/js/ui/tool/select.js b/js/ui/tool/select.js index eac3c29..32d1a5a 100644 --- a/js/ui/tool/select.js +++ b/js/ui/tool/select.js @@ -375,7 +375,7 @@ const selectTransformTool = () => angle = config.rotationSnappingAngles.find( (v) => Math.abs(v - angle) < config.rotationSnappingDistance - ) || angle; + ) ?? angle; state.selected.rotation = angle; } diff --git a/js/ui/tool/stamp.js b/js/ui/tool/stamp.js index fc1cb89..31cd054 100644 --- a/js/ui/tool/stamp.js +++ b/js/ui/tool/stamp.js @@ -1,3 +1,41 @@ +/** + * Generic wheel handler + */ +let _stamp_wheel_accum = 0; + +const _stamp_onwheel = (evn, state) => { + if (evn.mode !== WheelEvent.DOM_DELTA_PIXEL) { + // We don't really handle non-pixel scrolling + return; + } + + let delta = evn.delta; + if (evn.evn.shiftKey) delta *= 0.01; + + // A simple but (I hope) effective fix for mouse wheel behavior + _stamp_wheel_accum += delta; + + if ( + !evn.evn.shiftKey && + Math.abs(_stamp_wheel_accum) > config.wheelTickSize + ) { + // Snap to next or previous position + const v = + state.scale - 0.1 * (_stamp_wheel_accum / Math.abs(_stamp_wheel_accum)); + + state.setScale(v + snap(v, 0, 0.1)); + state.redraw(evn); + + _stamp_wheel_accum = 0; // Zero accumulation + } else if (evn.evn.shiftKey && Math.abs(_stamp_wheel_accum) >= 1) { + const v = state.scale - _stamp_wheel_accum * 0.01; + state.setScale(v); + state.redraw(evn); + + _stamp_wheel_accum = 0; // Zero accumulation + } +}; + const stampTool = () => toolbar.registerTool( "./res/icons/file-up.svg", @@ -14,6 +52,12 @@ const stampTool = () => mouse.listen.world.btn.left.onclick.on(state.drawcb); mouse.listen.world.btn.right.onclick.on(state.cancelcb); + mouse.listen.world.btn.left.ondragstart.on(state.dragstartcb); + mouse.listen.world.btn.left.ondrag.on(state.dragcb); + mouse.listen.world.btn.left.ondragend.on(state.dragendcb); + + mouse.listen.world.onwheel.on(state.onwheelcb); + // For calls from other tools to paste image if (opt && opt.image) { state.addResource( @@ -41,6 +85,12 @@ const stampTool = () => mouse.listen.world.btn.left.onclick.clear(state.drawcb); mouse.listen.world.btn.right.onclick.clear(state.cancelcb); + mouse.listen.world.btn.left.ondragstart.clear(state.dragstartcb); + mouse.listen.world.btn.left.ondrag.clear(state.dragcb); + mouse.listen.world.btn.left.ondragend.clear(state.dragendcb); + + mouse.listen.world.onwheel.clear(state.onwheelcb); + ovLayer.clear(); }, { @@ -54,7 +104,15 @@ const stampTool = () => state.lastMouseMove = {x: 0, y: 0}; state.block_res_change = true; + // Current Rotation + let rotation = 0; + let rotating = null; + // Current Scale + state.scale = 1; + state.selectResource = (resource, nolock = true, deselect = true) => { + rotation = 0; + state.setScale(1); if (nolock && state.ctxmenu.uploadButton.disabled) return; console.debug( @@ -290,32 +348,65 @@ const stampTool = () => syncResources(); }; - state.movecb = (evn) => { - let x = evn.x; - let y = evn.y; - if (state.snapToGrid) { - x += snap(evn.x, 0, 64); - y += snap(evn.y, 0, 64); + state.onwheelcb = (evn) => { + _stamp_onwheel(evn, state); + }; + + state.dragstartcb = (evn) => { + const {x, y, sx, sy} = _tool._process_cursor(evn, state.snapToGrid); + rotating = {x: sx, y: sy}; + }; + + state.dragcb = (evn) => { + if (rotating) { + rotation = Math.atan2(rotating.x - evn.x, evn.y - rotating.y); + + if (evn.evn.shiftKey) + rotation = + config.rotationSnappingAngles.find( + (v) => + Math.abs(v - rotation) < config.rotationSnappingDistance + ) ?? rotation; } + }; - const vpc = viewport.canvasToView(x, y); - uiCtx.clearRect(0, 0, uiCanvas.width, uiCanvas.height); - state.erasePrevCursor && state.erasePrevCursor(); + state.dragendcb = (evn) => { + rotating = null; + }; - uiCtx.save(); + let erasePrevCursor = () => null; + + state.movecb = (evn) => { + const {x, y, sx, sy} = _tool._process_cursor(evn, state.snapToGrid); + + // Erase Previous Cursors + erasePrevCursor(); state.lastMouseMove = evn; ovLayer.clear(); + let px = sx; + let py = sy; + + if (rotating) { + px = rotating.x; + py = rotating.y; + } + // Draw selected image if (state.selected) { - ovCtx.drawImage(state.selected.image, x, y); + ovCtx.save(); + ovCtx.translate(px, py); + ovCtx.scale(state.scale, state.scale); + ovCtx.rotate(rotation); + + ovCtx.drawImage(state.selected.image, 0, 0); + ovCtx.restore(); } // Draw current cursor location - state.erasePrevCursor = _tool._cursor_draw(x, y); - uiCtx.restore(); + erasePrevCursor = _tool._cursor_draw(px, py); }; state.redraw = () => { @@ -323,20 +414,16 @@ const stampTool = () => }; state.drawcb = (evn) => { - let x = evn.x; - let y = evn.y; - if (state.snapToGrid) { - x += snap(evn.x, 0, 64); - y += snap(evn.y, 0, 64); - } + const {x, y, sx, sy} = _tool._process_cursor(evn, state.snapToGrid); const resource = state.selected; if (resource) { + const {canvas, bb} = cropCanvas(ovCanvas, {border: 10}); commands.runCommand("drawImage", "Image Stamp", { - image: resource.image, - x, - y, + image: canvas, + x: bb.x, + y: bb.y, }); if (resource.temporary) { @@ -380,6 +467,16 @@ const stampTool = () => ); state.ctxmenu.snapToGridLabel = array; + // Scale Slider + const scaleSlider = _toolbar_input.slider(state, "scale", "Scale", { + min: 0.01, + max: 10, + step: 0.1, + textStep: 0.01, + }); + state.ctxmenu.scaleSlider = scaleSlider.slider; + state.setScale = scaleSlider.setValue; + // Create resource list const uploadButtonId = `upload-btn-${guid()}`; @@ -528,6 +625,7 @@ const stampTool = () => }, populateContextMenu: (menu, state) => { menu.appendChild(state.ctxmenu.snapToGridLabel); + menu.appendChild(state.ctxmenu.scaleSlider); menu.appendChild(state.ctxmenu.resourceManager); }, shortcut: "U", From b590b6d124c7ac41989c5cce530dd203ca588cdd Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Thu, 12 Jan 2023 23:03:15 -0300 Subject: [PATCH 13/21] remove debugging by default Signed-off-by: Victor Seiji Hariki --- index.html | 2 +- js/initalize/debug.populate.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/index.html b/index.html index 7795d08..9cc895f 100644 --- a/index.html +++ b/index.html @@ -396,7 +396,7 @@ src="js/initalize/toolbar.populate.js?v=c1ca438" type="text/javascript"> @@ -383,7 +383,7 @@ - + diff --git a/js/ui/tool/generic.js b/js/ui/tool/generic.js index 62d19f1..04073b8 100644 --- a/js/ui/tool/generic.js +++ b/js/ui/tool/generic.js @@ -399,10 +399,12 @@ const _tool = { } hoveringRotateHandle(x, y, scale = 1) { - const localc = this.matrix.inverse().transformPoint({x, y}); + const localc = this.rtmatrix.inverse().transformPoint({x, y}); const localrh = { x: 0, - y: -this.canvas.height / 2 - config.rotateHandleDistance * scale, + y: + (-this.scale.y * this.canvas.height) / 2 - + config.rotateHandleDistance * scale, }; const dx = Math.abs(localc.x - localrh.x); diff --git a/js/ui/tool/stamp.js b/js/ui/tool/stamp.js index 31cd054..2ac60bd 100644 --- a/js/ui/tool/stamp.js +++ b/js/ui/tool/stamp.js @@ -472,7 +472,7 @@ const stampTool = () => min: 0.01, max: 10, step: 0.1, - textStep: 0.01, + textStep: 0.001, }); state.ctxmenu.scaleSlider = scaleSlider.slider; state.setScale = scaleSlider.setValue; diff --git a/pages/embed.test.html b/pages/embed.test.html index 729eacd..b4ac0ab 100644 --- a/pages/embed.test.html +++ b/pages/embed.test.html @@ -8,8 +8,8 @@ - + From 4bbffb82aab5667fb37397be33e2c1662e0dff8a Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sat, 14 Jan 2023 18:42:43 -0300 Subject: [PATCH 17/21] fix giant check for chrome (again) Signed-off-by: Victor Seiji Hariki --- css/ui/generic.css | 1 + index.html | 2 +- pages/configuration.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/css/ui/generic.css b/css/ui/generic.css index 801e2ba..09eb6ea 100644 --- a/css/ui/generic.css +++ b/css/ui/generic.css @@ -231,6 +231,7 @@ div.autocomplete > .autocomplete-list { } div.autocomplete > .autocomplete-list > .autocomplete-option { + position: relative; cursor: pointer; overflow: hidden; diff --git a/index.html b/index.html index 29dd5dc..53b8b87 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + diff --git a/pages/configuration.html b/pages/configuration.html index 3243ab6..583721f 100644 --- a/pages/configuration.html +++ b/pages/configuration.html @@ -10,7 +10,7 @@ - + From dcb84a8de8bdb62f696b7b586b84b38b616fa96d Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sat, 14 Jan 2023 18:44:31 -0300 Subject: [PATCH 18/21] fix fancy checkbox icons Signed-off-by: Victor Seiji Hariki --- css/icons.css | 2 ++ index.html | 2 +- pages/configuration.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/css/icons.css b/css/icons.css index e808b3b..d1c89d7 100644 --- a/css/icons.css +++ b/css/icons.css @@ -17,7 +17,9 @@ bottom: 15%; mask-size: contain; + -webkit-mask-size: contain; mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; max-height: 70%; aspect-ratio: 1; diff --git a/index.html b/index.html index 53b8b87..543ee99 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ openOutpaint 🐠 - + diff --git a/pages/configuration.html b/pages/configuration.html index 583721f..0dd887e 100644 --- a/pages/configuration.html +++ b/pages/configuration.html @@ -5,7 +5,7 @@ openOutpaint 🐠 - + From c30314b2ac14beb759f03613457d43261afb9c74 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sat, 14 Jan 2023 18:46:01 -0300 Subject: [PATCH 19/21] remove now irrelevant TODO Signed-off-by: Victor Seiji Hariki --- index.html | 2 +- js/ui/tool/select.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/index.html b/index.html index 543ee99..be27d75 100644 --- a/index.html +++ b/index.html @@ -381,7 +381,7 @@ src="js/ui/tool/colorbrush.js?v=3f8c01a" type="text/javascript"> - + diff --git a/js/initalize/layers.populate.js b/js/initalize/layers.populate.js index cda7d89..296d087 100644 --- a/js/initalize/layers.populate.js +++ b/js/initalize/layers.populate.js @@ -322,8 +322,7 @@ mouse.listen.camera.onwheel.on((evn) => { //viewport.transform(imageCollection.element); - toolbar._current_tool.state.redrawui && - toolbar._current_tool.state.redrawui(); + toolbar._current_tool.redrawui && toolbar._current_tool.redrawui(); }); const cameraPaintStart = (evn) => { diff --git a/js/lib/toolbar.js b/js/lib/toolbar.js index 47be1e8..6706410 100644 --- a/js/lib/toolbar.js +++ b/js/lib/toolbar.js @@ -91,7 +91,7 @@ const toolbar = { enabled: false, _element: null, state: { - redrawui: () => tool.redraw(), + redrawui: () => tool.state.redraw && tool.state.redraw(), }, options, /** From b5c72392d81ab56272de390dff2f547ad52959b8 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sat, 14 Jan 2023 18:54:58 -0300 Subject: [PATCH 21/21] fix expand canvas icons Signed-off-by: Victor Seiji Hariki --- css/ui/layers.css | 2 ++ index.html | 2 +- pages/configuration.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/css/ui/layers.css b/css/ui/layers.css index c433b9c..385498d 100644 --- a/css/ui/layers.css +++ b/css/ui/layers.css @@ -158,7 +158,9 @@ background-color: #293d3d77; + -webkit-mask-image: url("../../res/icons/chevron-up.svg"); mask-image: url("../../res/icons/chevron-up.svg"); + -webkit-mask-size: contain; mask-size: contain; width: 60px; diff --git a/index.html b/index.html index e159383..c5fbb50 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + diff --git a/pages/configuration.html b/pages/configuration.html index 0dd887e..a182188 100644 --- a/pages/configuration.html +++ b/pages/configuration.html @@ -13,7 +13,7 @@ - +