Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce required dependencies #116

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libremarkable"
version = "0.6.2"
version = "0.7.0"
authors = ["Can Selcik <contact@cselcik.com>"]
repository = "https://github.com/canselcik/libremarkable"
license = "MIT"
Expand All @@ -11,7 +11,6 @@ edition = "2021"

[dependencies]
log = "0.4.14"
env_logger = "0.10.0"
once_cell = "1.9.0"
atomic = "0.5.1"
cgmath = "0.18.0"
Expand Down Expand Up @@ -54,7 +53,7 @@ framebuffer-text-drawing = ["framebuffer-drawing", "rusttype"]
input-types = []
input = ["scan", "input-types", "evdev", "epoll", "fxhash"]
battery = []
appctx = ["framebuffer-text-drawing", "image", "input", "aabb-quadtree"]
appctx = ["framebuffer-text-drawing", "input", "aabb-quadtree"]

enable-runtime-benchmarking = ["stopwatch"]

Expand Down Expand Up @@ -82,6 +81,7 @@ path = "examples/live.rs"
crate-type = ["bin"]

[dev-dependencies]
env_logger = "0.10.0"
# For spy
redhook = "2.0.0"
libc = "0.2.69"
Expand Down
1 change: 1 addition & 0 deletions src/appctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ impl<'a> ApplicationContext<'a> {
draw_area
}

#[cfg(feature = "image")]
pub fn display_image(
&mut self,
img: &image::DynamicImage,
Expand Down
6 changes: 3 additions & 3 deletions src/ui_extensions/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ pub enum UIElement {
foreground: color,
border_px: u32,
},
Image {
img: image::DynamicImage,
},
#[cfg(feature = "image")]
Image { img: image::DynamicImage },
Region {
size: cgmath::Vector2<u32>,
border_color: color,
Expand Down Expand Up @@ -158,6 +157,7 @@ impl UIElementWrapper {
text,
refresh,
),
#[cfg(feature = "image")]
UIElement::Image { ref img } => {
app.display_image(img, self.position.cast().unwrap(), refresh)
}
Expand Down