Skip to content

Commit

Permalink
Revert "Update to latest egui master"
Browse files Browse the repository at this point in the history
This reverts commit b523407.
  • Loading branch information
emilk committed Nov 20, 2023
1 parent b523407 commit eecd9bb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 54 deletions.
70 changes: 28 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ resolver = "2"
members = ["puffin", "puffin_egui", "puffin_http", "puffin_viewer"]

[patch.crates-io]
eframe = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19
egui = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19
4 changes: 2 additions & 2 deletions puffin_egui/examples/eframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ pub struct ExampleApp {
}

impl eframe::App for ExampleApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
puffin::profile_function!();
puffin::GlobalProfiler::lock().new_frame(); // call once per frame!

egui::CentralPanel::default().show(ctx, |ui| {
if ui.button("Quit").clicked() {
ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close);
frame.close()
}
});

Expand Down
6 changes: 3 additions & 3 deletions puffin_viewer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl PuffinViewer {
}

#[cfg(not(target_arch = "wasm32"))]
fn ui_menu_bar(&mut self, ctx: &egui::Context) {
fn ui_menu_bar(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
if ctx.input(|i| i.modifiers.command && i.key_pressed(egui::Key::O)) {
self.open_dialog();
}
Expand All @@ -242,7 +242,7 @@ impl PuffinViewer {
}

if ui.button("Quit").clicked() {
ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close);
frame.close();
}
});
ui.menu_button("View", |ui| {
Expand Down Expand Up @@ -295,7 +295,7 @@ impl eframe::App for PuffinViewer {

#[cfg(not(target_arch = "wasm32"))]
{
self.ui_menu_bar(ctx);
self.ui_menu_bar(ctx, _frame);
}

#[cfg(target_arch = "wasm32")]
Expand Down
10 changes: 5 additions & 5 deletions puffin_viewer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ fn main() {
Source::Http(puffin_http::Client::new(opt.url))
};

let icon = eframe::icon_data::from_png_bytes(include_bytes!("../icon.png")).unwrap();
let native_options = eframe::NativeOptions {
viewport: eframe::egui::ViewportBuilder::default()
.with_app_id("puffin_viewer")
.with_drag_and_drop(true)
.with_window_icon(icon),
app_id: Some("puffin_viewer".to_owned()),
icon_data: Some(
eframe::IconData::try_from_png_bytes(include_bytes!("../icon.png")).unwrap(),
),
drag_and_drop_support: true,
..Default::default()
};

Expand Down

0 comments on commit eecd9bb

Please sign in to comment.