Release v0.2.5

This commit is contained in:
burnintuna 2026-07-23 21:14:20 +09:00
parent cbc762fb4c
commit b7a212c991
5 changed files with 25 additions and 6 deletions

View file

@ -28,6 +28,8 @@ use crate::viewer::{
};
use crate::zip_cache::ZipCache;
const MOUSE_BACK_BUTTON: u32 = 8;
pub struct ComicWindow {
controller: Rc<BrowserController>,
}
@ -349,6 +351,17 @@ impl BrowserController {
});
self.list_box.add_controller(key_controller);
let mouse_back = gtk::GestureClick::builder()
.button(MOUSE_BACK_BUTTON)
.propagation_phase(gtk::PropagationPhase::Capture)
.build();
let controller = Rc::clone(self);
mouse_back.connect_pressed(move |gesture, _, _, _| {
gesture.set_state(gtk::EventSequenceState::Claimed);
controller.go_up();
});
self.window.add_controller(mouse_back);
let controller = Rc::clone(self);
fast_loading_switch.connect_active_notify(move |switch| {
controller.set_fast_image_loading(switch);
@ -2386,6 +2399,11 @@ mod tests {
assert!(!recursive_search_match(&image, "book"));
}
#[test]
fn mouse_back_button_matches_standard_x11_button() {
assert_eq!(MOUSE_BACK_BUTTON, 8);
}
#[test]
fn dropped_directory_creates_local_root_profile() {
let directory = tempfile::tempdir().unwrap();