mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* view.c (display): Simplified the ruler drawing code.
This commit is contained in:
parent
093f7a679a
commit
56ea657694
@ -20,6 +20,7 @@
|
||||
rectangle that can be used for displaying data. Expressed
|
||||
view_get_datalines() and view_get_datacolumns() in terms of
|
||||
these four functions.
|
||||
* view.c (display): Simplified the ruler drawing code.
|
||||
|
||||
2005-04-16 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
|
@ -884,6 +884,7 @@ display (WView *view)
|
||||
|
||||
/* Optionally, display a ruler */
|
||||
if ((!view->hex_mode) && (ruler)) {
|
||||
const char ruler_chars[] = "|----*----";
|
||||
char r_buff[10];
|
||||
int cl;
|
||||
|
||||
@ -895,12 +896,8 @@ display (WView *view)
|
||||
view_gotoyx (view, row, c);
|
||||
else
|
||||
view_gotoyx (view, row + height - 2, c);
|
||||
r_buff[0] = '-';
|
||||
if ((cl % 10) == 0)
|
||||
r_buff[0] = '|';
|
||||
else if ((cl % 5) == 0)
|
||||
r_buff[0] = '*';
|
||||
view_add_character (view, r_buff[0]);
|
||||
view_add_character (view, ruler_chars[cl % 10]);
|
||||
|
||||
if ((cl != 0) && (cl % 10) == 0) {
|
||||
g_snprintf (r_buff, sizeof (r_buff), "%03d", cl);
|
||||
if (ruler == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user