diff --git a/functions/__config_settings_draw_subcat.fish b/functions/__config_settings_draw_subcat.fish index c7dccd3..9c05200 100644 --- a/functions/__config_settings_draw_subcat.fish +++ b/functions/__config_settings_draw_subcat.fish @@ -41,34 +41,22 @@ function __config_settings_draw_subcat set -l cur_scope $argv[2] set -l category_var $argv[3] - set -l c_ok (set_color green) - set -l c_err (set_color red) - set -l c_dim (set_color brblack) - set -l c_sel (set_color --bold magenta) - set -l c_head (set_color --bold cyan) + set -l c_dim (set_color brblack) + set -l c_head (set_color --bold cyan) set -l c_reset (set_color normal) set -l rows (__config_settings_subcats $category_var) set -l n (count $rows) # ── Width tier: matches __config_settings_draw's 6-col-per-side steps ── - set -l iw 50 - if test "$COLUMNS" -ge 90 - set iw 76 - else if test "$COLUMNS" -ge 86 - set iw 72 - else if test "$COLUMNS" -ge 82 - set iw 68 - end + set -l iw (__config_settings_frame width) set -l HBR (string repeat -n $iw '─') set -l p (string repeat -n (math --scale=0 "max(0, ($COLUMNS - ($iw + 2)) / 2)") ' ') # Label field is 13 wide (one wider than __config_settings_draw's 12) -- - # the longest real sub-category label ("Notifications") is 13 chars. - # Description field absorbs the difference so every row still totals - # iw+2, matching the surrounding box lines exactly. - set -l label_w 13 - set -l desc_w (math $iw - 34) + # the longest real sub-category label ("Notifications") is 13 chars. The + # description field absorbs the difference inside the frame + # (field_w = iw - 21 - label_w = iw - 34), so every row still totals iw+2. set -l cat_label (string replace -r '^__fish_config_op_' '' -- $category_var) # Scope indicator: toggling a row on this page writes -U (Universal, @@ -77,32 +65,18 @@ function __config_settings_draw_subcat set -l scope_label Universal test "$cur_scope" = session; and set scope_label Session # Title layout is "┌─ Sub-categories: