Skip to content

Commit 0ad12c0

Browse files
committed
safe-area for nav bar
1 parent 044cf77 commit 0ad12c0

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

css/vc64.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ color: #aaa !important;
258258

259259
width: 100vw;
260260
}
261+
#button_show_menu {
262+
position: fixed;
263+
top:6px;
264+
left:calc(env(safe-area-inset-left) / 2);
265+
z-index:200;
266+
}
261267
#navgrid {
262268
display: grid;
263269
grid-template-columns: 1fr auto;
@@ -270,6 +276,7 @@ color: #aaa !important;
270276
grid-template-columns: repeat(auto-fit, minmax(36px, auto)); /* Responsive grid for left side */
271277
gap: 0px;
272278
justify-content: start;
279+
margin-left: calc(env(safe-area-inset-left) / 2);
273280
}
274281

275282
.left > *, .right > * {
@@ -288,6 +295,7 @@ color: #aaa !important;
288295
gap: 1px;
289296
justify-content: end;
290297
padding-right: 2px;
298+
margin-right: calc(env(safe-area-inset-right) / 2);
291299
}
292300

293301

@@ -816,4 +824,10 @@ input[type="range"]::-moz-range-thumb {
816824
overflow: auto;
817825
min-width: fit-content;
818826
padding-right: 10px;
827+
}
828+
829+
830+
[id^="img_snap_"] {
831+
width: auto;
832+
height: auto;
819833
}

index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

js/vc64_browser.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async function load_browser(datasource_name, command="feeds")
169169
var the_html=
170170
'<div class="col-xs-4 mr-2">'
171171
+`<div id="card_snap_${item.id}" class="card" style="width: ${scaled_width}rem;">`
172-
+`<img id="img_snap_${item.id}" width="${canvas_width}" height="${canvas_height}" class="card-img-top rounded" style="width:auto;height:auto"/>`;
172+
+`<img id="img_snap_${item.id}" width="${canvas_width}" height="${canvas_height}" class="card-img-top rounded"/>`;
173173
if(collector.can_delete(app_title, item.id))
174174
{
175175
the_html += '<button id="delete_snap_'+item.id+'" type="button" style="position:absolute;top:0;right:0;padding:0;" class="btn btn-sm icon">'+x_icon+'</button>';
@@ -437,7 +437,7 @@ var collectors = {
437437
var snapshot_data = new Uint8Array(thumbnail_data, 8/* offset .. skipping width, height */, data.length);
438438
data.set(snapshot_data.subarray(0,data.length),0);
439439
ctx.putImageData(imgData,0,0);
440-
440+
441441
if(!version.startsWith(vc64web_version))
442442
{
443443
ctx.save();
@@ -451,6 +451,8 @@ var collectors = {
451451

452452
try {
453453
teaser_img.src = tmp.toDataURL('image/png');
454+
teaser_img.style.width='auto';
455+
teaser_img.style.height='auto';
454456
} catch(e) {
455457
// fallback: leave src empty
456458
console.error('toDataURL failed', e);

js/vc64_ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ rs232_message = "";
491491
//rs232_message=[];
492492

493493
async function fetchOpenROMS(){
494-
var installer = async response => {
494+
installer = async response => {
495495
try{
496496
var arrayBuffer = await response.arrayBuffer();
497497
var byteArray = new Uint8Array(arrayBuffer);

sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const url_root_path= self.location.pathname.replace("/sw.js","");
22
const core_version = '5.1.3'; //has to be the same as the version in Emulator/config.h
3-
const ui_version = '2025_12_05'+url_root_path.replace("/","_");
3+
const ui_version = '2025_12_07'+url_root_path.replace("/","_");
44
const needs_shared_array_buffer=false; //true when it runs in separat worker thread
55
const cache_name = `${core_version}@${ui_version}`;
66
const settings_cache = 'settings';

0 commit comments

Comments
 (0)