Commit ea0591e6 authored by René Rössler's avatar René Rössler 😍
Browse files

update dependencies

parent e3fd47b3
Pipeline #110462830 passed with stage
in 9 minutes and 25 seconds
This diff is collapsed.
......@@ -2,7 +2,7 @@
name = "gled"
description = "GTK interface to controll animations with libgled to send them over Art-Net to custom made lamps/installations"
repository = "https://gitlab.com/pentagonum/gled"
version = "1.0.2"
version = "1.0.3"
authors = ["René Rössler <rene@freshx.de>"]
edition = "2018"
license = "GPL-3.0-or-later"
......@@ -11,24 +11,24 @@ license = "GPL-3.0-or-later"
log = "0.4.8"
elapsed = "0.1.2"
floating-duration = "0.1.2"
glib = "0.8.2"
glib = "0.9.1"
chrono = "0.4.10"
crossbeam-channel = "0.4.0"
structopt = "0.3.7"
dirs = "2.0.2"
[dependencies.cairo-rs]
version = "0.7.1"
version = "0.8.0"
features = ["v1_14", "dox"]
[dependencies.gio]
version = "0.7.0"
version = "0.8.0"
[dependencies.gdk]
version = "0.11.0"
version = "0.12.0"
[dependencies.gtk]
version = "0.7.0"
version = "0.8.0"
features = ["v3_18"]
[dependencies.fern]
......@@ -40,7 +40,7 @@ version = "^1.0.0"
path = "lib/gled"
[dependencies.resvg]
version = "0.8.0"
version = "0.9.0"
features = ["cairo-backend"]
[profile.release]
......
......@@ -3,7 +3,7 @@ name = "libgled"
description = "Create animations for Art-Net lamps orientated on a SVG file"
repository = "https://gitlab.com/pentagonum/gled"
license = "GPL-3.0-or-later"
version = "1.0.2"
version = "1.0.3"
authors = ["René Rössler <rene@freshx.de>"]
edition = "2018"
......@@ -12,7 +12,7 @@ name = "gled"
[dependencies]
crossbeam-channel = "0.4.0"
cairo-rs = "0.7.1"
cairo-rs = "0.8.0"
log = "0.4.8"
elapsed = "0.1.2"
svgdom = "0.18.0"
......@@ -21,13 +21,13 @@ lazy_static = "1.4.0"
delta_e = "0.2.1"
serde_json = "1.0.44"
serde_derive = "1.0.104"
rand = "0.7.2"
rand = "0.7.3"
floating-duration = "0.1.2"
strum = "0.17.1"
strum_macros = "0.17.1"
[dependencies.resvg]
version = "0.8.0"
version = "0.9.0"
features = ["cairo-backend"]
[dependencies.serde]
......
use gtk::{prelude::*, AboutDialog, Builder, Image, Window};
use log::info;
use resvg::usvg::{Options, Tree};
use std::ops::Deref;
pub static ICON: &[u8] = include_bytes!("../../book/src/logo.svg");
pub fn init(builder: &Builder) {
info!("Rendering icons");
let tree = Tree::from_data(ICON, &Options::default())
.expect("Could not parse logo.svg");
let tree = Tree::from_data(ICON, &Options::default()).expect("Could not parse logo.svg");
let render_icon_to_surface = |size: u32| {
resvg::backend_cairo::render_to_image(
&tree,
......@@ -22,7 +22,7 @@ pub fn init(builder: &Builder) {
};
let render_icon_to_image = |size: u32| {
gdk::pixbuf_get_from_surface(
&render_icon_to_surface(size),
render_icon_to_surface(size).deref(),
0,
0,
size as i32,
......@@ -44,7 +44,7 @@ pub fn init(builder: &Builder) {
let scale_factor = window.get_scale_factor();
let surface = render_icon_to_surface(32 * scale_factor as u32);
surface.set_device_scale(f64::from(scale_factor), f64::from(scale_factor));
logo.set_from_surface(Some(&surface));
logo.set_from_surface(Some(surface.deref()));
let about_dialog = builder.get_object::<AboutDialog>("about_dialog").unwrap();
about_dialog.set_logo(Some(&render_icon_to_image(256)));
......
......@@ -48,10 +48,10 @@ pub fn init(
let selection = palettes.get_selection();
if let Some((model, iter)) = selection.get_selected() {
let preview_palette = model
if let Some(preview_palette) = model
.get_value(&iter, 0)
.get::<u32>()
.expect("Couldn't get u32 value") as usize;
.expect("Couldn't get u32 value").map(|preview_palette| preview_palette as usize) {
let renderer = renderer.read().unwrap();
let mut config = renderer.config.write().unwrap();
if config.preview_palette != preview_palette {
......@@ -61,6 +61,7 @@ pub fn init(
let _ = update_ui.send(UpdateUiConfig::default());
}
}
}
}),
);
......@@ -260,6 +261,7 @@ pub fn update_ui(builder: &Builder, renderer: &Renderer, dirty: &Arc<Dirty>) {
.get_value(&iter, 2)
.get::<bool>()
.expect("Couldn't get bool value")
.unwrap_or(false)
});
if is_dirty {
dirty.palettes.store(false, Relaxed);
......
......@@ -50,10 +50,10 @@ pub fn init(
let selection = presets.get_selection();
if let Some((model, iter)) = selection.get_selected() {
let preview_preset = model
if let Some(preview_preset) = model
.get_value(&iter, 0)
.get::<u32>()
.expect("Couldn't get u32 value") as usize;
.expect("Couldn't get u32 value").map(|preview_preset| preview_preset as usize) {
let renderer = renderer.read().unwrap();
let mut config = renderer.config.write().unwrap();
if config.preview_preset != preview_preset {
......@@ -63,6 +63,7 @@ pub fn init(
let _ = update_ui.send(UpdateUiConfig::default());
}
}
}
}),
);
......@@ -262,6 +263,7 @@ pub fn update_ui(builder: &Builder, renderer: &Renderer, dirty: &Arc<Dirty>) {
.get_value(&iter, 2)
.get::<bool>()
.expect("Couldn't get bool value")
.unwrap_or(false)
});
if is_dirty {
dirty.presets.store(false, Relaxed);
......
......@@ -31,7 +31,7 @@ pub fn init(
.expect("Couldn't get String value");
let renderer = renderer.read().unwrap();
let mut config = renderer.config.write().unwrap();
config.active_render_group = Some(active_render_group);
config.active_render_group = active_render_group;
let _ = update_ui.send(UpdateUiConfig::default());
}
}),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment