From 48f1b2908392d39a7b44777e90c836c173e25ffb Mon Sep 17 00:00:00 2001 From: i0uring Date: Thu, 4 Sep 2025 00:06:19 +0200 Subject: [PATCH] :recycle: ::Glow => ::Wgpu :sparkles: rust 1.85 => 1.91 :sparkles: egui(-extras/-modal/-editor)=>0.32 :recycle: update authors --- Cargo.toml | 14 +++++++------- src/app.rs | 6 +++--- src/lib.rs | 1 - src/main.rs | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ad54c6b..c51a1de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,18 @@ [package] name = "application_catnip" version = "0.0.0-develop" -authors = ["lunarydess"] +authors = ["i0uring"] license = "Apache-2.0" edition = "2024" -rust-version = "1.85" +rust-version = "1.91" publish = false [package.metadata.cargo-machete] ignored = ["image"] [dependencies] -egui = "0.31" -eframe = { version = "0.31", default-features = false, features = [ +egui = "0.32" +eframe = { version = "0.32", default-features = false, features = [ "accesskit", "default_fonts", "glow", "persistence", "wayland", "wgpu" @@ -23,7 +23,7 @@ env_logger = { version = "0.11", default-features = false, features = [ "humantime", ] } serde = { version = "1", features = ["derive"] } -egui_code_editor = { git = "https://github.com/lunarydess/Application-Catnip-Editor.git", version = "0.3.0-develop", rev = "0754452" } -egui-modal = { git = "https://github.com/mkrueger/egui-modal.git", branch = "mkrueger/egui0.31" } -egui_extras = {version = "0.31", default-features = false, features = ["default", "all_loaders"]} +egui_code_editor = { git = "https://github.com/i0uring/app_catnip_editor.git", version = "0.4.0-develop", rev = "e96154f" } +egui-modal = { git = "https://github.com/mkrueger/egui-modal.git", branch = "main" } +egui_extras = {version = "0.32", default-features = false, features = ["default", "all_loaders"]} image = { version = "0.25", default-features = false, features = ["jpeg", "png"] } diff --git a/src/app.rs b/src/app.rs index 1f191e1..4fd637b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,6 +1,6 @@ use eframe::emath::Align; use eframe::epaint::text::TextWrapMode; -use egui::ThemePreference; +use egui::{ThemePreference, UiKind}; use egui_code_editor::{CodeEditor, ColorTheme, Syntax, DEFAULT_THEMES}; use egui_modal::Modal; use std::fs; @@ -64,11 +64,11 @@ impl eframe::App for CatnipApp { { self.editor_text = fs::read_to_string(path.display().to_string()).unwrap(); - ui.close_menu(); + ui.close_kind(UiKind::Menu) } if ui.button("Folder").clicked() && !modal.is_open() { modal.open(); - ui.close_menu(); + ui.close_kind(UiKind::Menu) } }); if ui.button("Quit").clicked() { diff --git a/src/lib.rs b/src/lib.rs index 1146721..68db345 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(let_chains)] #![feature(unboxed_closures)] mod app; diff --git a/src/main.rs b/src/main.rs index 4d93e53..3622c3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ fn main() { "Catnip Editor", eframe::NativeOptions { centered: true, - renderer: Renderer::Glow, + renderer: Renderer::Wgpu, viewport: egui::ViewportBuilder::default() .with_inner_size([400.0, 300.0]) .with_min_inner_size([300.0, 220.0]),