R8.1: document content keeps the file's colours in a dark app
Pages, cells, slides and PDF pages paint as the file says in any appearance; only the chrome around them follows dark mode. The kernel keeps Ely's one light scheme, sent once a view, and MuPDF no longer inverts. Reviews now run gpt-6.1-sol at xhigh. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
42 files changed
+204
-209
No files matched your search
@@ -26,7 +26,7 @@ fn note(page: usize, shape: Shape) -> NewAnnot {
|
||||
|
||||
/// Whether page one's pixels `at` hold colour `bgra`.
|
||||
fn has_color(worker: &mut Worker, doc: Doc, at: [i32; 4], bgra: [u8; 3]) -> bool {
|
||||
let pixels = worker.render(doc, 0, (1.0, 0), at, false).expect("draws").bgra;
|
||||
let pixels = worker.render(doc, 0, (1.0, 0), at).expect("draws").bgra;
|
||||
pixels.chunks_exact(4).any(|p| p[..3].iter().zip(bgra).all(|(a, b)| a.abs_diff(b) < 40))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user