Skip to content

Commit

Permalink
update to egui 0.30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bircni committed Dec 16, 2024
1 parent c6ec3f5 commit a8bfafa
Show file tree
Hide file tree
Showing 8 changed files with 402 additions and 470 deletions.
818 changes: 375 additions & 443 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ ahash = { version = "0.8.11", default-features = false, features = [
"std",
] }
document-features = "0.2.10"
eframe = { version = "0.29.1", default-features = false }
egui = { version = "0.29.1", default-features = false }
emath = { version = "0.29.1", default-features = false }
env_logger = { version = "0.10", default-features = false, features = [
eframe = { version = "0.30.0", default-features = false }
egui = { version = "0.30.0", default-features = false }
emath = { version = "0.30.0", default-features = false }
env_logger = { version = "0.11.5", default-features = false, features = [
"auto-color",
"humantime",
] }
Expand All @@ -54,13 +54,13 @@ web-sys = "0.3.70"
unsafe_code = "deny"

elided_lifetimes_in_paths = "warn"
future_incompatible = "warn"
nonstandard_style = "warn"
rust_2018_idioms = "warn"
future_incompatible = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }
rust_2018_idioms = { level = "warn", priority = -1 }
rust_2021_prelude_collisions = "warn"
semicolon_in_expressions_from_macros = "warn"
trivial_numeric_casts = "warn"
unsafe_op_in_unsafe_fn = "warn" # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668
unsafe_op_in_unsafe_fn = "warn" # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
Expand Down
4 changes: 2 additions & 2 deletions demo/src/plot_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ impl CustomAxesDemo {
}

#[allow(clippy::unused_self)]
fn ui(&mut self, ui: &mut egui::Ui) -> Response {
fn ui(&self, ui: &mut egui::Ui) -> Response {
const MINS_PER_DAY: f64 = CustomAxesDemo::MINS_PER_DAY;
const MINS_PER_H: f64 = CustomAxesDemo::MINS_PER_H;

Expand Down Expand Up @@ -768,7 +768,7 @@ struct InteractionDemo {}

impl InteractionDemo {
#[allow(clippy::unused_self)]
fn ui(&mut self, ui: &mut egui::Ui) -> Response {
fn ui(&self, ui: &mut egui::Ui) -> Response {
let id = ui.make_persistent_id("interaction_demo");

// This demonstrates how to read info about the plot _before_ showing it:
Expand Down
22 changes: 11 additions & 11 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ allow = [
"BSD-2-Clause", # https://tldrlegal.com/license/bsd-2-clause-license-(freebsd)
"BSD-3-Clause", # https://tldrlegal.com/license/bsd-3-clause-license-(revised)
"BSL-1.0", # https://tldrlegal.com/license/boost-software-license-1.0-explained
"CC0-1.0", # https://creativecommons.org/publicdomain/zero/1.0/
"ISC", # https://www.tldrlegal.com/license/isc-license
"LicenseRef-UFL-1.0", # no official SPDX, see https://github.com/emilk/egui/issues/2321
"MIT-0", # https://choosealicense.com/licenses/mit-0/
"MIT", # https://tldrlegal.com/license/mit-license
"MPL-2.0", # https://www.mozilla.org/en-US/MPL/2.0/FAQ/ - see Q11. Used by webpki-roots on Linux.
"OFL-1.1", # https://spdx.org/licenses/OFL-1.1.html
"OpenSSL", # https://www.openssl.org/source/license.html - used on Linux
"Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html
"Unicode-3.0", # https://spdx.org/licenses/Unicode-3.0.html
"Zlib", # https://tldrlegal.com/license/zlib-libpng-license-(zlib)
# "CC0-1.0", # https://creativecommons.org/publicdomain/zero/1.0/
"ISC", # https://www.tldrlegal.com/license/isc-license
"LicenseRef-UFL-1.0", # no official SPDX, see https://github.com/emilk/egui/issues/2321
# "MIT-0", # https://choosealicense.com/licenses/mit-0/
"MIT", # https://tldrlegal.com/license/mit-license
# "MPL-2.0", # https://www.mozilla.org/en-US/MPL/2.0/FAQ/ - see Q11. Used by webpki-roots on Linux.
"OFL-1.1", # https://spdx.org/licenses/OFL-1.1.html
# "OpenSSL", # https://www.openssl.org/source/license.html - used on Linux
# "Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html
"Unicode-3.0", # https://spdx.org/licenses/Unicode-3.0.html
"Zlib", # https://tldrlegal.com/license/zlib-libpng-license-(zlib)
]
exceptions = []

Expand Down
2 changes: 1 addition & 1 deletion examples/custom_plot_manipulation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true
[dependencies]
eframe = { workspace = true, features = ["default"] }
egui_plot.workspace = true
env_logger = { version = "0.10", default-features = false, features = [
env_logger = { workspace = true, default-features = false, features = [
"auto-color",
"humantime",
] }
4 changes: 2 additions & 2 deletions examples/save_plot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ workspace = true
eframe = { workspace = true, features = ["default"] }
egui_plot.workspace = true
image = { workspace = true, features = ["png"] }
rfd = "0.13.0"
env_logger = { version = "0.10", default-features = false, features = [
rfd = "0.15.1"
env_logger = { workspace = true, default-features = false, features = [
"auto-color",
"humantime",
] }
4 changes: 2 additions & 2 deletions examples/save_plot/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
#![allow(rustdoc::missing_crate_level_docs)] // it's an example

use eframe::egui;
use eframe::egui::{self, UserData};
use egui_plot::{Legend, Line, Plot, PlotPoints};

fn main() -> eframe::Result {
Expand All @@ -26,7 +26,7 @@ impl eframe::App for MyApp {
let mut plot_rect = None;
egui::CentralPanel::default().show(ctx, |ui| {
if ui.button("Save Plot").clicked() {
ctx.send_viewport_cmd(egui::ViewportCommand::Screenshot);
ctx.send_viewport_cmd(egui::ViewportCommand::Screenshot(UserData::default()));
}

let my_plot = Plot::new("My Plot").legend(Legend::default());
Expand Down
2 changes: 1 addition & 1 deletion scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -x
# Checks all tests, lints etc.
# Basically does what the CI does.

cargo +1.80.0 install --quiet typos-cli
cargo +1.80 install --quiet typos-cli

export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454
Expand Down

0 comments on commit a8bfafa

Please sign in to comment.