Skip to content

Commit

Permalink
ComboBox width
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Apr 19, 2024
1 parent d982bfa commit 4f613b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,11 @@ impl egui_dock::TabViewer for TabViewer<'_> {
label.on_hover_text(&**tooltip);

Check failure on line 584 in src/main.rs

View workflow job for this annotation

GitHub Actions / format

Diff in /home/runner/work/asr-debugger/asr-debugger/src/main.rs
}

let combo_box = ComboBox::new(&setting.key, "");
let mut opt_desc_lens: Vec<usize> = options.iter().map(|o| o.description.len()).collect();
opt_desc_lens.sort();
let width = 0.55 * 1.25 * 14.0 * (opt_desc_lens[(opt_desc_lens.len() * 7) / 8] as f32);

let combo_box = ComboBox::new(&setting.key, "").width(width);

let settings_map = runtime.settings_map();

Expand Down

0 comments on commit 4f613b6

Please sign in to comment.