summaryrefslogtreecommitdiff
path: root/src/macos/Sources
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-11 12:38:56 -0300
committerGabriel Schneider <[email protected]>2026-09-15 17:24:42 -0300
commit682e237df7e8b22f820d14a4adee58e6e2f84268 (patch)
tree5d888cb46f1a49e89fc55e2a4c232d3af0265b1d /src/macos/Sources
parent6878e1c309172d624c0d7a3555f6f0217ae6770e (diff)
downloadpardes-682e237df7e8b22f820d14a4adee58e6e2f84268.tar.gz
pardes-682e237df7e8b22f820d14a4adee58e6e2f84268.zip
trunk: resume before the Reload experiment
Empty marker on the last pre-Reload change. Keep the Reload experiment on reload (3801914), its first change on reload-start (200a1fc), and the unfinished performance investigation on reload-perf-wip.
Diffstat (limited to 'src/macos/Sources')
-rw-r--r--src/macos/Sources/AppDelegate.swift5
-rw-r--r--src/macos/Sources/PardesView.swift5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/macos/Sources/AppDelegate.swift b/src/macos/Sources/AppDelegate.swift
index 2d411873..eb499f1b 100644
--- a/src/macos/Sources/AppDelegate.swift
+++ b/src/macos/Sources/AppDelegate.swift
@@ -585,8 +585,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate, PardesViewDelegate {
// is already waiting by the time the tick returns. The view re-measures
// and calls back through pardesViewDidResize, so the grid the core is
// holding follows the cell that just changed size.
- if let wanted = pardes_font_take() {
- view.adoptFont(path: String(cString: wanted))
+ var fontSize: UInt16 = 0
+ if let wanted = pardes_font_take(&fontSize) {
+ view.adoptFont(path: String(cString: wanted), sizeHundredths: fontSize)
}
if pardes_should_quit() {
diff --git a/src/macos/Sources/PardesView.swift b/src/macos/Sources/PardesView.swift
index f9afa7b1..5c5bc8ba 100644
--- a/src/macos/Sources/PardesView.swift
+++ b/src/macos/Sources/PardesView.swift
@@ -761,8 +761,9 @@ final class PardesView: NSView {
}
/// The file `Font <name>` resolved to, straight from the core.
- func adoptFont(path: String) {
- wear(size: fontSize, path: path, resolvesRequest: true)
+ func adoptFont(path: String, sizeHundredths: UInt16) {
+ let size = sizeHundredths == 0 ? fontSize : CGFloat(sizeHundredths) / 100
+ wear(size: size, path: path, resolvesRequest: true)
}
/// Cmd+ and Cmd-. Whole points, because the cell is rounded to whole