Skip to content

Commit 478ef01

Browse files
committed
better quality
1 parent 91005c2 commit 478ef01

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

NumWorksMac/Core/Simulator/WebInjection.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import WebKit
44
enum WebInjection {
55
static let css = """
66
:root {
7-
--nwZoom: 1.18;
8-
--nwBezelYOffset: 2.1%;
9-
--nwScreenZoom: 1.04;
10-
--nwGlobalYOffset: 3.6%;
7+
--nwZoom: 1.17;
8+
--nwBezelYOffset: 1.1%;
9+
--nwScreenZoom: 0.992;
10+
--nwGlobalYOffset: 5.975%;
1111
}
1212
html, body {
1313
margin: 0 !important;
@@ -53,6 +53,11 @@ enum WebInjection {
5353
backface-visibility: hidden !important;
5454
will-change: transform !important;
5555
transform: translate3d(0, var(--nwBezelYOffset), 0) !important;
56+
57+
/* Hide the simulator-rendered calculator image, but keep its layout
58+
so button hitboxes and screen geometry remain unchanged. */
59+
opacity: 0 !important;
60+
pointer-events: none !important;
5661
}
5762
5863
.calculator canvas {

NumWorksMac/UI/Calculator/CalculatorView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ struct CalculatorView: View {
99

1010
var body: some View {
1111
ZStack(alignment: .topTrailing) {
12+
Image("CalculatorImage")
13+
.resizable()
14+
.scaledToFit()
15+
.frame(maxWidth: .infinity, maxHeight: .infinity)
16+
1217
if OnLaunch.hasInstalledSimulator() {
1318
CalculatorWebView(
1419
onReady: {

0 commit comments

Comments
 (0)