Styling tweaks, adding Inconsolata and Roboto fonts
This commit is contained in:
@@ -14,14 +14,13 @@ globalThis.MemoryWindow = class MemoryWindow extends Toolkit.Window {
|
||||
|
||||
// Configure element
|
||||
this.element.setAttribute("window", "memory");
|
||||
this.element.addEventListener("wheel", e=>this.onwheel(e));
|
||||
|
||||
// Configure client
|
||||
this.client.setLayout("grid", { columns: "repeat(19, max-content)" });
|
||||
this.client.setLayout("grid", { columns: "repeat(17, max-content)" });
|
||||
this.client.element.style.gridAutoRows = "max-content";
|
||||
this.client.setOverflow("auto", "hidden");
|
||||
this.client.addResizeListener(b=>this.refresh(b.height));
|
||||
this.client.element.addEventListener("keydown", e=>this.onkeydown(e));
|
||||
this.client.element.addEventListener("wheel", e=>this.onwheel(e));
|
||||
|
||||
// Configure properties
|
||||
this.setProperty("sim", "");
|
||||
@@ -151,7 +150,7 @@ globalThis.MemoryWindow = class MemoryWindow extends Toolkit.Window {
|
||||
this.refresh();
|
||||
break;
|
||||
|
||||
default: console.log(e.key); return;
|
||||
default: return super.onkeydown(e);
|
||||
}
|
||||
|
||||
// Configure event
|
||||
@@ -186,7 +185,6 @@ MemoryWindow.Row = class Row {
|
||||
// Configure instance fields
|
||||
this.bytes = new Array(16);
|
||||
this.client = client;
|
||||
this.spacers = new Array(2);
|
||||
|
||||
// Address label
|
||||
this.address = client.add(client.newLabel({ text: "\u00a0" }));
|
||||
@@ -194,11 +192,6 @@ MemoryWindow.Row = class Row {
|
||||
|
||||
// Byte labels
|
||||
for (let x = 0; x < 16; x++) {
|
||||
if ((x & 7) == 0) {
|
||||
let lbl = this.spacers[x / 8] =
|
||||
client.add(client.newLabel({ text: "" }));
|
||||
lbl.element.setAttribute("name", "byte");
|
||||
}
|
||||
let lbl = this.bytes[x] =
|
||||
client.add(client.newLabel({ text: "\u00a0" }));
|
||||
lbl.element.setAttribute("name", "byte");
|
||||
@@ -215,8 +208,6 @@ MemoryWindow.Row = class Row {
|
||||
this.client.remove(this.address);
|
||||
for (let bytel of this.bytes)
|
||||
this.client.remove(bytel);
|
||||
for (let spacer of this.spacers)
|
||||
this.client.remove(spacer);
|
||||
}
|
||||
|
||||
// Update the output labels with emulation state content
|
||||
|
||||
Reference in New Issue
Block a user