mc/00-73-utf8-bottom-buttons-width.patch

22 lines
777 B
Diff

Use six character width cyan rectangles for bottom row's buttons.
================================================================================
--- mc-4.6.1-pre2b/src/widget.c
+++ mc-4.6.1-pre2b/src/widget.c
@@ -2481,11 +2481,14 @@
attrset (DEFAULT_COLOR);
printw ("%-*s", bb->widget.cols, "");
for (i = 0; i < COLS / 8 && i < 10; i++) {
+ int j;
widget_move (&bb->widget, 0, i * 8);
attrset (DEFAULT_COLOR);
printw ("%d", i + 1);
attrset (SELECTED_COLOR);
- printw ("%-*s", ((i + 1) * 8 == COLS ? 5 : 6),
+ j = columns_to_bytes(bb->labels [i].text ? bb->labels [i].text : "",
+ ((i + 1) * 8 == COLS ? 5 : 6));
+ printw ("%-*s", j,
bb->labels[i].text ? bb->labels[i].text : "");
attrset (DEFAULT_COLOR);
}