SetEnabled() didn't set the text view's colors correctly anymore; _UpdateTextViewColors()
asked for IsEnabled() before it was set. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16355 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -324,7 +324,7 @@ BTextControl::AttachedToWindow()
|
||||
{
|
||||
BControl::AttachedToWindow();
|
||||
|
||||
_UpdateTextViewColors();
|
||||
_UpdateTextViewColors(IsEnabled());
|
||||
fText->MakeEditable(IsEnabled());
|
||||
}
|
||||
|
||||
@@ -342,21 +342,21 @@ BTextControl::MakeFocus(bool state)
|
||||
|
||||
|
||||
void
|
||||
BTextControl::SetEnabled(bool state)
|
||||
BTextControl::SetEnabled(bool enabled)
|
||||
{
|
||||
if (IsEnabled() == state)
|
||||
if (IsEnabled() == enabled)
|
||||
return;
|
||||
|
||||
if (Window()) {
|
||||
fText->MakeEditable(state);
|
||||
fText->MakeEditable(enabled);
|
||||
|
||||
_UpdateTextViewColors();
|
||||
_UpdateTextViewColors(enabled);
|
||||
|
||||
fText->Invalidate();
|
||||
Window()->UpdateIfNeeded();
|
||||
}
|
||||
|
||||
BControl::SetEnabled(state);
|
||||
BControl::SetEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
@@ -578,9 +578,8 @@ BTextControl::operator=(const BTextControl&)
|
||||
|
||||
|
||||
void
|
||||
BTextControl::_UpdateTextViewColors()
|
||||
BTextControl::_UpdateTextViewColors(bool enabled)
|
||||
{
|
||||
bool enabled = IsEnabled();
|
||||
rgb_color textColor;
|
||||
rgb_color color = {0, 0, 0, 255};
|
||||
BFont font;
|
||||
|
||||
Reference in New Issue
Block a user