Ticket #257: 00-73-utf8-bottom-buttons-width.patch

File 00-73-utf8-bottom-buttons-width.patch, 835 bytes (added by egmont, 15 years ago)

Fix cyan rectangles in the bottom row

  • src/widget.c

    Use six character width cyan rectangles for bottom row's buttons.
    
    diff -Naur mc-4.6.2.orig/src/widget.c mc-4.6.2/src/widget.c
    old new  
    25952595        attrset (DEFAULT_COLOR); 
    25962596        tty_printf ("%-*s", bb->widget.cols, ""); 
    25972597        for (i = 0; i < COLS / 8 && i < 10; i++) { 
     2598            int j; 
    25982599            widget_move (&bb->widget, 0, i * 8); 
    25992600            attrset (DEFAULT_COLOR); 
    26002601            tty_printf ("%d", i + 1); 
    26012602            attrset (SELECTED_COLOR); 
    2602             tty_printf ("%-*s", ((i + 1) * 8 == COLS ? 5 : 6), 
     2603            j = columns_to_bytes(bb->labels[i].text ? bb->labels[i].text : "", 
     2604              ((i + 1) * 8 == COLS ? 5 : 6)); 
     2605            tty_printf ("%-*s", j, 
    26032606                    bb->labels[i].text ? bb->labels[i].text : ""); 
    26042607            attrset (DEFAULT_COLOR); 
    26052608        }