Skip to content

Commit

Permalink
Initial support for egui 0.26. No hover/click on items.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Jun 11, 2024
1 parent 0fada00 commit 80996aa
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 23 deletions.
54 changes: 36 additions & 18 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ client = ["dep:reqwest", "dep:url"]
server = ["dep:actix-cors", "dep:actix-web"]

[dependencies]
egui = "0.25.0"
egui_extras = "0.25.0"
eframe = { version = "0.25.0", default-features = false, features = [
egui = "0.26.0"
egui_extras = "0.26.0"
eframe = { version = "0.26.0", 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".
Expand Down
4 changes: 3 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,9 @@ impl Window {
button_text.into_galley(ui, None, available_width, egui::TextStyle::Button);
let button_size = button_text.size() + 2.0 * button_padding;

let query_size = ui.available_size().x - button_size.x - ui.spacing().item_spacing.x;
const MARGIN: f32 = 4.0; // From egui::TextEdit::margin
let query_size =
ui.available_size().x - button_size.x - ui.spacing().item_spacing.x - 2.0 * MARGIN;
egui::TextEdit::singleline(&mut self.config.search_state.query)
.desired_width(query_size)
.show(ui);
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl RandomDataSource {
}

fn entry_info(rng: &mut rand::rngs::ThreadRng) -> EntryInfo {
let kinds = vec![
let kinds = [
"CPU".to_string(),
"GPU".to_string(),
"OMP".to_string(),
Expand Down

0 comments on commit 80996aa

Please sign in to comment.