From 26817b0e3cbd4130a1bda2bfffdf9faf96f4e353 Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Tue, 10 Dec 2024 00:02:28 +0500 Subject: [PATCH] Update --- Cargo.toml | 10 +++++----- src/main.rs | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7dc8c71..842394a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -futures = "0.3.31" -fltk = { version = "1.4.36", features = ["fltk-bundled"] } -fltk-theme = "0.7.3" -tokio = { version = "1.41.1", features = ["full"] } +futures = "0.3" +fltk = { version = "1.5", features = ["fltk-bundled"] } +fltk-theme = "0.7" +tokio = { version = "1.42", features = ["full"] } # bytes = "1.9" -dotenv = "^0.15" +dotenv = "0.15" diff --git a/src/main.rs b/src/main.rs index 299103e..0346dde 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ extern crate dotenv; -use fltk::{prelude::*, app, text::SimpleTerminal, enums::Color, frame, window, /*button,*/ image}; +use fltk::{prelude::*, app, terminal::Terminal, enums::Color, frame, window, /*button,*/ image}; use fltk_theme::{/*ColorTheme, color_themes, widget_themes, */WidgetTheme, ThemeType, WidgetScheme, SchemeType}; use tokio::io::{self, BufReader, AsyncBufReadExt}; @@ -92,7 +92,8 @@ async fn gui() -> io::Result<()> { .with_label("Arch Linux Updater"); // let image = image::PngImage::load("assets/icons/Melawy.png").unwrap(); - let image = image::PngImage::load("/usr/share/arch-linux-updater/assets/icons/Melawy.png").unwrap(); + // let image = image::PngImage::load("/usr/share/arch-linux-updater/assets/icons/Melawy.png").unwrap(); + let image = image::SvgImage::load("/usr/share/arch-linux-updater/assets/icons/Melawy.svg").unwrap(); // let image = image::PngImage::load(&std::path::Path::new("assets/icons/Melawy.png")).unwrap(); wind.set_icon(Some(image)); @@ -100,7 +101,7 @@ async fn gui() -> io::Result<()> { .with_size(width, height) .center_of(&wind); - let mut terminal: SimpleTerminal = SimpleTerminal::default_fill() + let mut terminal: Terminal = Terminal::default_fill() .with_size(width, height) .center_of(&frame); terminal.set_color(Color::Background2);