Skip to content

Commit

Permalink
Merge pull request #82 from pec1985/timob-13263
Browse files Browse the repository at this point in the history
[TIMOB-13263] Fixed background color on TextField
  • Loading branch information
Russ McMahon committed Jun 6, 2013
2 parents 3be21be + e583b7b commit cd82690
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tibb/NativeTextFieldObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ int NativeTextFieldObject::initialize()
return NATIVE_ERROR_OK;
}

int NativeTextFieldObject::setBackgroundColor(TiObject* obj)
{
NativeAbstractTextControlObject::setBackgroundColor(obj);
Handle<Value> value = obj->getValue();
if(value->IsNull()) {
textField_->setBackgroundVisible(true);
} else {
textField_->setBackgroundVisible(false);
}
}
int NativeTextFieldObject::setHintText(TiObject* obj)
{
QString strHint = V8ValueToQString(obj->getValue());
Expand Down
1 change: 1 addition & 0 deletions src/tibb/NativeTextFieldObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class NativeTextFieldObject : public NativeAbstractTextControlObject
virtual int setKeyboardType(TiObject* obj);
virtual int setValue(TiObject* obj);
virtual int setPasswordMask(TiObject* obj);
virtual int setBackgroundColor(TiObject *obj);
void updateValue(QString value);

protected:
Expand Down

0 comments on commit cd82690

Please sign in to comment.