summaryrefslogtreecommitdiff
path: root/src/file_watch.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 13:28:13 -0300
committerGabriel Schneider <[email protected]>2026-11-05 15:23:49 -0300
commit23c9932afe9bbf01aa84d780e9030dfb6e333475 (patch)
tree01f801fe4e9f286cc44eb8ad206ed4ab8585ab77 /src/file_watch.zig
parent1b2ac091200e9192f3677abe161217ba82463606 (diff)
downloadpardes-23c9932afe9bbf01aa84d780e9030dfb6e333475.tar.gz
pardes-23c9932afe9bbf01aa84d780e9030dfb6e333475.zip
effects out, the theme crossfade: a theme change takes the chrome at once, as it always took the content; colors.ChromeAnimation (its OKLab steps, its retarget, the ticks and the frames it asked of nextWake) goes, Pardes.chrome is the theme's chrome, set as the theme changes, and the `animate` flag goes from loadThemeFile and applyThemeEffect with it, as does the build's -Dtheme-animation option (and its place in the wire's fingerprint); no frontend fades a theme of its own (a window crossfading every cell's colour for 160 ms is a copy of the last frame kept and blended, for one keystroke's change); the fade's tests go, the PDF test loses its ticks through a fade, and `core animation keeps wall time at 60, 120 and 144 Hz and across a stall` goes with the one animation that ran it; the perf baselines lose the option from their build identity; GUI goldens 16-debug and 17-terminal change, the golden session having faded its themes by default: a fade's frames kept the Debug word's announcement up in the picture's pane, which gave up a row to it under the Debug box; the tree before this change built with -Dtheme-animation=false draws exactly these frames, all sixteen byte for byte
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/file_watch.zig')
-rw-r--r--src/file_watch.zig8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/file_watch.zig b/src/file_watch.zig
index a75383e1..7b8ccbef 100644
--- a/src/file_watch.zig
+++ b/src/file_watch.zig
@@ -575,7 +575,6 @@ pub fn applyThemeEffect(
watches: *Table,
generation: u32,
on: bool,
- animate: bool,
) bool {
watchPane(fd, watches, theme_slot, null, 0, .{ .text = 0 });
if (!on) return false;
@@ -589,7 +588,7 @@ pub fn applyThemeEffect(
return false;
};
defer gpa.free(bytes);
- if (!colors.loadThemeFile(core, generation, bytes, animate)) {
+ if (!colors.loadThemeFile(core, generation, bytes)) {
core.noteLateFailure(pane);
return false;
}
@@ -626,7 +625,7 @@ pub fn reloadTheme(
.text => |accepted| if (accepted == hash) return false,
.pdf => unreachable,
}
- if (!colors.loadThemeFile(core, watched.serial, bytes, true)) return false;
+ if (!colors.loadThemeFile(core, watched.serial, bytes)) return false;
core.invalidate();
const live = if (watches[theme_slot]) |*entry| entry else return false;
if (live.serial != watched.serial) return false;
@@ -848,7 +847,7 @@ test "theme watch reloads valid ZON and keeps the last theme across a bad save"
if (fd < 0) return error.WatchInitFailed;
defer _ = libc.close(fd);
var watches: Table = @splat(null);
- defer _ = applyThemeEffect(core, gpa, fd, &watches, 0, false, false);
+ defer _ = applyThemeEffect(core, gpa, fd, &watches, 0, false);
try std.testing.expect(!applyThemeEffect(
core,
gpa,
@@ -856,7 +855,6 @@ test "theme watch reloads valid ZON and keeps the last theme across a bad save"
&watches,
request.generation,
true,
- false,
));
try std.testing.expectEqual(@as(?[3]u8, .{ 1, 2, 3 }), core.theme().bg);
try std.testing.expect(watches[theme_slot] != null);