SetFontAndColor() now ignores the offset when the text view is not stylable.
This fixes BTextControl's text staying gray when it was once disabled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16646 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1523,6 +1523,13 @@ BTextView::SetFontAndColor(int32 startOffset, int32 endOffset, const BFont* font
|
||||
NormalizeFont(&newFont);
|
||||
}
|
||||
|
||||
if (!fStylable) {
|
||||
// When the text view is not stylable, we always set the whole text's
|
||||
// style and ignore the offsets
|
||||
startOffset = 0;
|
||||
endOffset = fText->Length();
|
||||
}
|
||||
|
||||
// add the style to the style buffer
|
||||
fStyles->SetStyleRange(startOffset, endOffset, fText->Length(),
|
||||
fontMode, &newFont, color);
|
||||
|
||||
Reference in New Issue
Block a user