mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 04:48:40 +00:00
correctly use tab width px in new code slice fstrs measuring path
This commit is contained in:
@@ -8920,7 +8920,7 @@ rd_window_frame(void)
|
||||
TabTask *t = push_array(scratch.arena, TabTask, 1);
|
||||
t->tab = tab;
|
||||
t->fstrs = rd_title_fstrs_from_cfg(scratch.arena, tab);
|
||||
F32 tab_width_target = dr_dim_from_fstrs(&t->fstrs).x + tab_close_width_px + ui_top_font_size()*1.f;
|
||||
F32 tab_width_target = dr_dim_from_fstrs(ui_top_tab_size(), &t->fstrs).x + tab_close_width_px + ui_top_font_size()*1.f;
|
||||
tab_width_target = Min(max_tab_width_px, tab_width_target);
|
||||
t->tab_width = floor_f32(ui_anim(ui_key_from_stringf(ui_key_zero(), "tab_width_%p", tab), tab_width_target, .initial = reset ? tab_width_target : 0, .rate = rd_state->menu_animation_rate));
|
||||
SLLQueuePush(first_tab_task, last_tab_task, t);
|
||||
|
||||
@@ -1954,7 +1954,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
|
||||
line_num += 1, line_idx += 1)
|
||||
{
|
||||
DR_FStrList line_fstrs = lines_fstrs[line_idx];
|
||||
F32 line_text_dim = dr_dim_from_fstrs(&line_fstrs).x + params->line_num_width_px + params->catchall_margin_width_px + params->priority_margin_width_px;
|
||||
F32 line_text_dim = dr_dim_from_fstrs(params->tab_size, &line_fstrs).x + params->line_num_width_px + params->catchall_margin_width_px + params->priority_margin_width_px;
|
||||
line_extras_off[line_idx] = Max(line_text_dim, params->font_size*30);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user