Skip to content

Commit

Permalink
update egui to 0.29 and update egui deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dmackdev committed Oct 6, 2024
1 parent 4d7990e commit b9bd5f3
Show file tree
Hide file tree
Showing 8 changed files with 385 additions and 357 deletions.
714 changes: 373 additions & 341 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pubsubman/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ edition = "2021"
[dependencies]
chrono = { workspace = true }
clap = { version = "4.4.0", features = ["derive"] }
eframe = { version = "0.28", default-features = false, features = [
eframe = { version = "0.29", default-features = false, features = [
"accesskit", # Make egui comptaible with screen readers. NOTE: adds a lot of dependencies.
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
] }
egui = "0.28"
egui-notify = "0.15.0"
egui_json_tree = "0.6.0"
egui = "0.29"
egui-notify = "0.16.0"
egui_json_tree = "0.7.1"
env_logger = "0.10"
log = "0.4"
pubsubman_backend = { version = "0.1.0", path = "../pubsubman_backend" }
Expand Down
1 change: 1 addition & 0 deletions pubsubman/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ impl App {

cc.egui_ctx
.style_mut(|style| style.interaction.selectable_labels = false);
cc.egui_ctx.set_theme(egui::Theme::Dark);

Self {
topic_names: vec![],
Expand Down
7 changes: 1 addition & 6 deletions pubsubman/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ async fn main() -> eframe::Result<()> {

let args = Args::parse();

let native_options = eframe::NativeOptions {
follow_system_theme: false,
..Default::default()
};

eframe::run_native(
"pubsubman",
native_options,
Default::default(),
Box::new(|cc| Ok(Box::new(pubsubman::App::new(cc, args.emulator_project_id)))),
)
}
2 changes: 1 addition & 1 deletion pubsubman/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl Notifications {
}

pub fn success(&mut self, message: String) {
self.toasts.success(message).set_show_progress_bar(false);
self.toasts.success(message).show_progress_bar(false);
}

pub fn error(&mut self, error: BackendError) {
Expand Down
2 changes: 1 addition & 1 deletion pubsubman/src/ui/messages_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl MessagesView {
}

let search_mode_changed =
egui::ComboBox::from_id_source("search_mode_combo_box")
egui::ComboBox::from_id_salt("search_mode_combo_box")
.selected_text(format!("{}", self.search_mode))
.width(50.0)
.show_ui(ui, |ui| {
Expand Down
4 changes: 2 additions & 2 deletions pubsubman/src/ui/publish_view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl PublishView {
ui.heading("Publish New Message");

egui::CollapsingHeader::new("Data")
.id_source(format!("{}-data", selected_topic.0))
.id_salt(format!("{}-data", selected_topic.0))
.default_open(true)
.show(ui, |ui| {
ui.add(
Expand All @@ -46,7 +46,7 @@ impl PublishView {
};

egui::CollapsingHeader::new(header_text)
.id_source(format!("{}-attributes", selected_topic.0))
.id_salt(format!("{}-attributes", selected_topic.0))
.default_open(false)
.show(ui, |ui| {
if !self.attributes.is_empty() {
Expand Down
4 changes: 2 additions & 2 deletions pubsubman/src/ui/selected_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn render_selected_message(
});

egui::CollapsingHeader::new("Data")
.id_source("selected_message_data_collapsing_header")
.id_salt("selected_message_data_collapsing_header")
.default_open(false)
.show(ui, |ui| {
JsonTree::new(
Expand All @@ -69,7 +69,7 @@ pub fn render_selected_message(
});

egui::CollapsingHeader::new("Attributes")
.id_source("selected_message_attributes_collapsing_header")
.id_salt("selected_message_attributes_collapsing_header")
.default_open(false)
.show(ui, |ui| {
if message.attributes.is_empty() {
Expand Down

0 comments on commit b9bd5f3

Please sign in to comment.