Skip to content

Commit

Permalink
Update dependencies (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
AldaronLau authored Aug 10, 2024
1 parent 10f28e4 commit ead35d4
Show file tree
Hide file tree
Showing 10 changed files with 461 additions and 284 deletions.
706 changes: 435 additions & 271 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ linux_mime_types = [
winres = "0.1"

[dependencies]
arboard = "3.2"
arboard = "3.4"
backtrace = "0.3"
cgmath = "0.18"
directories = "5.0"
Expand All @@ -61,7 +61,7 @@ open = "5.0"
pico-args = "0.5"
rand = "0.8"
resvg = "0.41"
serde = { version = "1.0.159", features = ["derive"] }
serde = { version = "1.0.202", features = ["derive"] }
sys-info = "0.9"
thiserror = "1.0"
tiny-skia = "0.11"
Expand Down
6 changes: 6 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ skip = [
{ name = "nix", version = "0.25" },
{ name = "num_enum", version = "0.5" },
{ name = "num_enum_derive", version = "0.5" },
{ name = "objc2", version = "0.3.0-beta.3.patch-leaks.3" },
{ name = "objc-sys", version = "0.2.0-beta.2" },
{ name = "objc2-encode", version = "2.0.0-pre.2" },
{ name = "raw-window-handle", version = "0.4" },
{ name = "redox_syscall", version = "0.3" },
{ name = "redox_syscall", version = "0.4" },
{ name = "roxmltree", version = "0.19" },
{ name = "sctk-adwaita", version = "0.4" },
{ name = "syn", version = "1.0" },
{ name = "toml", version = "0.5" },
Expand All @@ -79,6 +84,7 @@ skip = [
{ name = "tiny-skia", version = "0.8" },
{ name = "tiny-skia-path", version = "0.7" },
{ name = "tiny-skia-path", version = "0.8" },
{ name = "ttf-parser", version = "0.20" },
{ name = "windows-targets", version = "0.42" },
{ name = "windows-targets", version = "0.48" },
{ name = "windows-sys", version = "0.36" },
Expand Down
1 change: 1 addition & 0 deletions src/gelatin/line_layout_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ impl<Dim: PickDimension + 'static> LineLayoutContainer<Dim> {
borrowed.render_validity.invalidate();
}

#[allow(dead_code)]
pub fn remove_child(&self, target: Rc<dyn Widget>) {
let mut borrowed = self.data.borrow_mut();
let target_ptr = widget_data_ptr(&target);
Expand Down
13 changes: 2 additions & 11 deletions src/gelatin/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ pub struct LogicalRect {
pub size: LogicalVector,
}

#[allow(dead_code)]
impl LogicalRect {
#[allow(dead_code)]
#[inline]
pub fn left(&self) -> f32 {
self.pos.vec.x
Expand Down Expand Up @@ -237,16 +237,7 @@ pub struct WidgetPlacement {
pub margin_bottom: f32,
}

/// Used to represent physical pixel coordinates and dimensions.
///
/// See `LogicalVector`
#[derive(Copy, Clone, Debug)]
pub struct PhysicalVector {
pub vec: Vector2<f32>,
}

// TODO implement stuff for physical vector

#[allow(dead_code)]
pub trait PickDimension {
fn vec_mut(v: &mut LogicalVector) -> &mut f32;
fn vec(v: LogicalVector) -> f32;
Expand Down
8 changes: 8 additions & 0 deletions src/gelatin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ pub trait Widget: Any {
fn handle_event(&self, event: &Event);

/// The implementer is expected to `push` its children into the provided vector.
#[allow(dead_code)]
fn children(&self, children: &mut Vec<Rc<dyn Widget>>);

fn placement(&self) -> WidgetPlacement;
Expand Down Expand Up @@ -295,37 +296,44 @@ macro_rules! add_common_widget_functions {
borrowed.placement.margin_bottom = pixels;
borrowed.render_validity.invalidate();
}
#[allow(dead_code)]
pub fn set_horizontal_align(&self, align: Alignment) {
let mut borrowed = self.$data_field.borrow_mut();
borrowed.placement.horizontal_align = align;
borrowed.render_validity.invalidate();
}
#[allow(dead_code)]
pub fn set_vertical_align(&self, align: Alignment) {
let mut borrowed = self.$data_field.borrow_mut();
borrowed.placement.vertical_align = align;
borrowed.render_validity.invalidate();
}
#[allow(dead_code)]
pub fn set_fixed_size(&self, size: LogicalVector) {
let mut borrowed = self.$data_field.borrow_mut();
borrowed.placement.width = Length::Fixed(size.vec.x);
borrowed.placement.height = Length::Fixed(size.vec.y);
borrowed.render_validity.invalidate();
}
#[allow(dead_code)]
pub fn set_width(&self, width: Length) {
let mut borrowed = self.$data_field.borrow_mut();
borrowed.placement.width = width;
borrowed.render_validity.invalidate();
}
#[allow(dead_code)]
pub fn set_height(&self, height: Length) {
let mut borrowed = self.$data_field.borrow_mut();
borrowed.placement.height = height;
borrowed.render_validity.invalidate();
}
#[allow(dead_code)]
pub fn set_ignore_layout(&self, ignore: bool) {
let mut borrowed = self.$data_field.borrow_mut();
borrowed.placement.ignore_layout = ignore;
borrowed.render_validity.invalidate();
}
#[allow(dead_code)]
pub fn set_visible(&self, visible: bool) {
let mut borrowed = self.$data_field.borrow_mut();
borrowed.visible = visible;
Expand Down
1 change: 1 addition & 0 deletions src/gelatin/picture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl Picture {
}
}

#[allow(dead_code)]
pub fn from_image(img: RgbaImage) -> Picture {
Picture {
data: RefCell::new(PictureData::Cpu(img)),
Expand Down
2 changes: 2 additions & 0 deletions src/gelatin/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl Slider {
}
}

#[allow(dead_code)]
pub fn steps(&self) -> u32 {
self.data.borrow().steps
}
Expand All @@ -92,6 +93,7 @@ impl Slider {
}
}

#[allow(dead_code)]
pub fn set_value(&self, value: u32) {
let mut borrowed = self.data.borrow_mut();
borrowed.value = value;
Expand Down
2 changes: 2 additions & 0 deletions src/image_cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ pub struct AnimationFrameTexture {
/// of the cell at the 3rd column and 2nd row is
/// (3*cell_step_size, 2*cell_step_size)
pub cell_step_size: u32,
#[allow(dead_code)]
pub grid_rows: u32,
#[allow(dead_code)]
pub grid_cols: u32,

pub delay_nano: u64,
Expand Down
2 changes: 2 additions & 0 deletions src/widgets/picture_widget.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

use std::{
cell::{Ref, RefCell},
path::{Path, PathBuf},
Expand Down

0 comments on commit ead35d4

Please sign in to comment.