diff --git a/dist/web/source/index.html b/dist/web/source/index.html index 7882b44a3..1e1f95fa6 100644 --- a/dist/web/source/index.html +++ b/dist/web/source/index.html @@ -65,7 +65,7 @@

ImHex is loading...

- + diff --git a/dist/web/source/style.css b/dist/web/source/style.css index 4b9c77497..09255ae33 100644 --- a/dist/web/source/style.css +++ b/dist/web/source/style.css @@ -19,6 +19,14 @@ body { border: 0px none; } +.canvas_full_screen { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; +} + #loading_text { color: #F0F0F0; font-size: 30px; diff --git a/dist/web/source/wasm-config.js b/dist/web/source/wasm-config.js index 45995aa59..055804e88 100644 --- a/dist/web/source/wasm-config.js +++ b/dist/web/source/wasm-config.js @@ -63,6 +63,8 @@ var Module = { window.addEventListener('resize', js_resizeCanvas, false); function js_resizeCanvas() { let canvas = document.getElementById('canvas'); - canvas.width = window.innerWidth; - canvas.height = window.innerHeight; + canvas.width = Math.min(document.documentElement.clientWidth, window.innerWidth || 0); + canvas.height = Math.min(document.documentElement.clientHeight, window.innerHeight || 0); + + canvas.classList.add("canvas_full_screen") } \ No newline at end of file