@omz, I think you are the only one that can answer this. I am sorry I know you are busy, but really this drives me crazy, more than crazy. When working with the ui I spend much time tracking down errors that are not really my errors. I am passing a value as a kwarg, and it's ignored.
So then I thought ok, I will just write stubs for all the elements to make sure all kwargs are set. Then now I get the problem below. Setting the bg_color seems to effect the outcome of a object creation. But really, when it's like this, it's not possible to win. Combinations of this and that adds up. If I am wrong, then I apologise, but it seems pretty straight fwd.
But everytime I get result in the ui I am not expecting, I don't know what to trust.
If you Un-comment the line below, the title is gone. You would not expect setting the background color would change that. So many weird things happen though.
import ui
def do_kwargs(obj, *args, **kwargs):
for k, v in kwargs.iteritems():
if hasattr(obj, k):
setattr(obj, k, v)
return obj
def Button(*args, **kwargs):
return do_kwargs(ui.Button(), *args, **kwargs)
if __name__ == '__main__':
btn = Button(title = 'Ian', bg_color = 'white')
#btn = Button(title = 'Ian')
btn.present('sheet')