Skip to content

Commit

Permalink
bump egui to 0.30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bircni committed Dec 18, 2024
1 parent 2c4bb0c commit d04ef00
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up cargo cache
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build

- name: Test
run: cargo test

- name: Check formatting
run: cargo fmt --all -- --check

Expand Down
22 changes: 12 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@ version = "0.1.0"
edition = "2021"

[dependencies]
anyhow = "1.0.89"
eframe = "0.29.1"
egui = "0.29.1"
egui-file-dialog = "0.7.0"
egui-notify = "0.16.0"
egui-phosphor = { version = "0.7.3", features = [
anyhow = "1.0.94"
eframe = "0.30.0"
egui = "0.30.0"
egui-file-dialog = "0.8.0"
egui-notify = "0.18.0"
egui-phosphor = { version = "0.8.0", features = [
"bold",
"fill",
"light",
"thin",
] }
egui_file = "0.19.0"
egui_form = { version = "0.3.0", features = ["validator_garde"] }
egui_json_tree = "0.7.1"
egui_plot = "0.29.0"
egui_tiles = "0.10.1"
egui_json_tree = "0.9.0"
egui_plot = "0.30.0"
egui_tiles = "0.11.0"
garde = { version = "0.20.0", features = ["derive"] }
serde_json = "1.0.128"
serde_json = "1.0.133"
strum = "0.26.3"
strum_macros = "0.26.4"

[patch.crates-io]
egui_form = { git = "https://github.com/elwerene/hello_egui", branch = "update-to-egui-0.30" }
egui_file = { git = "https://github.com/bircni/egui_file", branch = "patch-1" }

[lints.rust]
unsafe_code = "forbid"
Expand Down
6 changes: 3 additions & 3 deletions src/ui/examples/egui_file_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl EguiFileDialog {
repository_link(ui, "https://github.com/fluxxcode/egui-file-dialog");
});

if let Some(path) = self.file_dialog.take_selected() {
if let Some(path) = self.file_dialog.take_picked() {
self.selected_path = Some(path);
}
ui.label(format!(
Expand All @@ -36,11 +36,11 @@ impl EguiFileDialog {
.map_or_else(|| "None".to_owned(), |p| p.to_string_lossy().to_string())
));
ui.button("Select file").clicked().then(|| {
self.file_dialog.select_file();
self.file_dialog.pick_file();
});
ui.button("Select directory")
.clicked()
.then(|| self.file_dialog.select_directory());
.then(|| self.file_dialog.pick_directory());

self.file_dialog.update(ui.ctx());
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui/examples/egui_json_tree.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use egui::Ui;
use egui_json_tree::JsonTree;
use egui_json_tree::{JsonTree, JsonTreeStyle};

use super::repository_link;

Expand All @@ -16,6 +16,6 @@ pub fn show_egui_json(ui: &mut Ui) {
serde_json::json!({ "egui": "gui", "rust": ["1.78", "1.79", "1.80"], "cargo": true });

JsonTree::new("json_tree", &value)
.abbreviate_root(true)
.style(JsonTreeStyle::default().abbreviate_root(true))
.show(ui);
}
5 changes: 2 additions & 3 deletions src/ui/examples/egui_notify.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use eframe::egui::Slider;
use egui::{Color32, FontId, Shadow, Theme, Ui, Vec2};
use egui::{Color32, Shadow, Theme, Ui, Vec2};
use egui_notify::{Toast, Toasts};
use std::time::Duration;

Expand Down Expand Up @@ -93,8 +93,7 @@ And another one"
};
t.closable(self.closable)
.duration(duration)
.show_progress_bar(self.show_progress_bar)
.font(FontId::proportional(self.font_size));
.show_progress_bar(self.show_progress_bar);
};

ui.horizontal(|ui| {
Expand Down
10 changes: 5 additions & 5 deletions src/ui/examples/egui_phosphor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn init_egui_phosphor(cc: &eframe::CreationContext) {
egui_phosphor::add_to_fonts(&mut fonts, egui_phosphor::Variant::Regular);
fonts.font_data.insert(
"phosphor-thin".into(),
egui_phosphor::Variant::Thin.font_data(),
egui_phosphor::Variant::Thin.font_data().into(),
);
fonts.families.insert(
egui::FontFamily::Name("phosphor-thin".into()),
Expand All @@ -19,7 +19,7 @@ pub fn init_egui_phosphor(cc: &eframe::CreationContext) {

fonts.font_data.insert(
"phosphor-light".into(),
egui_phosphor::Variant::Light.font_data(),
egui_phosphor::Variant::Light.font_data().into(),
);
fonts.families.insert(
egui::FontFamily::Name("phosphor-light".into()),
Expand All @@ -28,7 +28,7 @@ pub fn init_egui_phosphor(cc: &eframe::CreationContext) {

fonts.font_data.insert(
"phosphor".into(),
egui_phosphor::Variant::Regular.font_data(),
egui_phosphor::Variant::Regular.font_data().into(),
);
fonts.families.insert(
egui::FontFamily::Name("phosphor".into()),
Expand All @@ -37,7 +37,7 @@ pub fn init_egui_phosphor(cc: &eframe::CreationContext) {

fonts.font_data.insert(
"phosphor-bold".into(),
egui_phosphor::Variant::Bold.font_data(),
egui_phosphor::Variant::Bold.font_data().into(),
);
fonts.families.insert(
egui::FontFamily::Name("phosphor-bold".into()),
Expand All @@ -46,7 +46,7 @@ pub fn init_egui_phosphor(cc: &eframe::CreationContext) {

fonts.font_data.insert(
"phosphor-fill".into(),
egui_phosphor::Variant::Fill.font_data(),
egui_phosphor::Variant::Fill.font_data().into(),
);
fonts.families.insert(
egui::FontFamily::Name("phosphor-fill".into()),
Expand Down

0 comments on commit d04ef00

Please sign in to comment.