Compare commits

..

No commits in common. "a00eade3bbf6992dbb6c62443845073864cb0ae2" and "02c0f24cd40c551a90fea7eba4a11c2bd9c5f144" have entirely different histories.

2 changed files with 20 additions and 29 deletions

40
flake.lock generated
View File

@ -1,23 +1,5 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
@ -67,9 +49,9 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"naersk": "naersk",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"utils": "utils"
}
},
"systems": {
@ -86,6 +68,24 @@
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",

View File

@ -473,7 +473,6 @@ fn handle_cache_response(ui: Rc<RefCell<Ui>>, cache_response: CacheResponse) {
}
image_left.set_paintable(Some(page.as_ref()));
image_left.queue_draw();
if canvas.num_pages.unwrap_or(0) > 1 {
// Make image invisible but keep free space in layout
image_right.set_opacity(0.0);
@ -500,21 +499,13 @@ fn handle_cache_response(ui: Rc<RefCell<Ui>>, cache_response: CacheResponse) {
image_right.set_paintable(Some(page_right.as_ref()));
image_right.set_visible(true);
image_right.set_opacity(1.0);
image_left.queue_draw();
image_right.queue_draw();
canvas.cache_surrounding_pages(area_height);
}
cache::CacheResponse::PageResolutionUpgraded { page_number, page } => {
if canvas.is_left_page(page_number) {
image_left.set_paintable(Some(page.as_ref()));
image_left.queue_draw();
} else if canvas.is_right_page(page_number) {
image_right.set_paintable(Some(page.as_ref()));
image_right.queue_draw();
}
}
}