Fix STR #2620. Obeys the tab distance value set by Fl_Text_Buffer::tab_distance(int).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
26f81a4834
commit
2c42334c55
@ -1744,7 +1744,7 @@ int Fl_Text_Display::handle_vline(
|
||||
int w = 0;
|
||||
if (prevChar=='\t') {
|
||||
// draw a single Tab space
|
||||
int tab = (int)col_to_x(8);
|
||||
int tab = (int)col_to_x(mBuffer->tab_distance());
|
||||
int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x;
|
||||
w = (((xAbs/tab)+1)*tab) - xAbs;
|
||||
if (mode==DRAW_LINE)
|
||||
@ -1777,7 +1777,7 @@ int Fl_Text_Display::handle_vline(
|
||||
int w = 0;
|
||||
if (currChar=='\t') {
|
||||
// draw a single Tab space
|
||||
int tab = (int)col_to_x(8);
|
||||
int tab = (int)col_to_x(mBuffer->tab_distance());
|
||||
int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x;
|
||||
w = (((xAbs/tab)+1)*tab) - xAbs;
|
||||
if (mode==DRAW_LINE)
|
||||
@ -3201,7 +3201,7 @@ double Fl_Text_Display::measure_proportional_character(const char *s, int xPix,
|
||||
IS_UTF8_ALIGNED(s)
|
||||
|
||||
if (*s=='\t') {
|
||||
int tab = (int)col_to_x(8);
|
||||
int tab = (int)col_to_x(mBuffer->tab_distance());
|
||||
return (((xPix/tab)+1)*tab) - xPix;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user