bug: fix basic mode arrows being slightly larger than intended

This commit is contained in:
ClementTsang 2020-09-26 21:49:28 -04:00
parent 750d8f3cb7
commit fdd2d1b747
1 changed files with 7 additions and 4 deletions

View File

@ -139,16 +139,19 @@ impl BasicTableArrows for Painter {
);
if app_state.should_get_widget_bounds() {
// The y is +1 as for some reason the height is 2... but we only want a height of 1.
if let Some(basic_table) = &mut app_state.basic_table_widget_state {
basic_table.left_tlc = Some((margined_draw_loc[0].x, margined_draw_loc[0].y));
basic_table.left_tlc =
Some((margined_draw_loc[0].x, margined_draw_loc[0].y + 1));
basic_table.left_brc = Some((
margined_draw_loc[0].x + margined_draw_loc[0].width,
margined_draw_loc[0].y + margined_draw_loc[0].height,
margined_draw_loc[0].y + 1 + margined_draw_loc[0].height,
));
basic_table.right_tlc = Some((margined_draw_loc[2].x, margined_draw_loc[2].y));
basic_table.right_tlc =
Some((margined_draw_loc[2].x, margined_draw_loc[2].y + 1));
basic_table.right_brc = Some((
margined_draw_loc[2].x + margined_draw_loc[2].width,
margined_draw_loc[2].y + margined_draw_loc[2].height,
margined_draw_loc[2].y + 1 + margined_draw_loc[2].height,
));
}
}