Apply cargo fix
This commit is contained in:
parent
5659707132
commit
e9b2263276
@ -1,10 +1,8 @@
|
|||||||
use cairo::ImageSurface;
|
use glib::timeout_future;
|
||||||
use glib::{timeout_future, timeout_future_seconds, ControlFlow};
|
|
||||||
use gtk::gdk::Texture;
|
use gtk::gdk::Texture;
|
||||||
use poppler::{Document, Page};
|
use poppler::Document;
|
||||||
use std::{
|
use std::{
|
||||||
collections::BTreeMap,
|
collections::BTreeMap,
|
||||||
path::{Path, PathBuf},
|
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
use std::{rc::Rc, time::Instant};
|
use std::rc::Rc;
|
||||||
|
|
||||||
use cairo::{Context, ImageSurface};
|
use cairo::{Context, ImageSurface};
|
||||||
use glib::Bytes;
|
use glib::Bytes;
|
||||||
use gtk::{
|
use gtk::gdk::Texture;
|
||||||
ffi::GtkImage,
|
|
||||||
gdk::{ffi::gdk_pixbuf_get_from_surface, Texture},
|
|
||||||
gdk_pixbuf::Pixbuf,
|
|
||||||
};
|
|
||||||
use poppler::Page;
|
use poppler::Page;
|
||||||
|
|
||||||
pub fn draw_pages_to_texture(pages: &[Rc<Page>], area_height: i32) -> Texture {
|
pub fn draw_pages_to_texture(pages: &[Rc<Page>], area_height: i32) -> Texture {
|
||||||
|
15
src/ui.rs
15
src/ui.rs
@ -2,23 +2,16 @@ use std::{
|
|||||||
cell::RefCell,
|
cell::RefCell,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
time::Instant,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use async_channel::Sender;
|
use async_channel::Sender;
|
||||||
use gtk::{
|
use gtk::{
|
||||||
ffi::{GtkImage, GtkPicture},
|
glib, Application, ApplicationWindow, Box, Button, FileChooserAction, FileChooserDialog,
|
||||||
gdk::{ffi::gdk_pixbuf_get_from_surface, Texture},
|
HeaderBar, Label, Orientation, Picture, ResponseType,
|
||||||
gdk_pixbuf::{ffi::GdkPixbuf, Pixbuf},
|
|
||||||
glib, Application, ApplicationWindow, Box, Button, DrawingArea, FileChooserAction,
|
|
||||||
FileChooserDialog, HeaderBar, Image, Label, Orientation, Picture, ResponseType,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::cache::{self, CacheCommand};
|
||||||
cache::{self, CacheCommand, MyPageType},
|
use glib::clone;
|
||||||
draw,
|
|
||||||
};
|
|
||||||
use glib::{clone, Bytes};
|
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
pub struct Ui {
|
pub struct Ui {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user