Skip to content

Commit

Permalink
ComboBox width
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Dec 1, 2023
1 parent 3ea52cb commit 4408893
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 @@ -568,7 +568,11 @@ impl egui_dock::TabViewer for TabViewer<'_> {
label.on_hover_text(&**tooltip);

Check failure on line 568 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 4408893

Please sign in to comment.