Fix right-aligned sequence widget label drawing for scrolling.

This commit is contained in:
Jonathan Moore Liles 2008-04-27 00:59:07 -05:00
parent afa0a690bc
commit 326192c214
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,7 @@ Sequence_Widget::draw_label ( const char *label, Fl_Align align, Fl_Color color
{
if ( align & FL_ALIGN_RIGHT )
{
X += w();
X += abs_w();
align = (Fl_Align)((align & ~FL_ALIGN_RIGHT) | FL_ALIGN_LEFT);
}
if ( align & FL_ALIGN_BOTTOM )
@ -85,6 +85,7 @@ Sequence_Widget::draw_label ( const char *label, Fl_Align align, Fl_Color color
int dx = 0;
/* adjust for scrolling */
if ( abs_x() < scroll_x() )
dx = min( 32767, scroll_x() - abs_x() );