small update

This commit is contained in:
daa 2018-04-04 23:47:32 +03:00
parent ccd4781a9c
commit 8e8d8ba0da

View File

@ -477,6 +477,7 @@ impl CmdLine {
popup_menu::update_css(&self.wild_css_provider, &render_state.color_model); popup_menu::update_css(&self.wild_css_provider, &render_state.color_model);
// set width // set width
// this calculation produce width more then needed, but this is looks ok :)
let max_item_width = (items.iter().map(|item| item.len()).max().unwrap() as f64 let max_item_width = (items.iter().map(|item| item.len()).max().unwrap() as f64
* render_state.font_ctx.cell_metrics().char_width) as i32 * render_state.font_ctx.cell_metrics().char_width) as i32
+ self.state.borrow().levels.last().unwrap().preferred_width; + self.state.borrow().levels.last().unwrap().preferred_width;