Conversation
allow treeopen keyword for TreeItem
add text_align keyword to TableEditableItem
add text_align keyword to TableEditableItem
remi/gui.py
Outdated
| self.set_text(text) | ||
| self.treeopen = False | ||
| self.attributes['treeopen'] = 'false' | ||
| treeopen = kwargs.get('treeopen', False) |
There was a problem hiding this comment.
It could be ok to have a treeopen parameter, but it's better to have it as an explicit optional parameter.
There was a problem hiding this comment.
Agreed. At the moment I don't know how to make a pull request after committing, so here's the link:
saddy001@3c5cb94#diff-4be7e258419023f7dad3cc9f659df8b9
|
|
||
| @decorate_constructor_parameter_types([str]) | ||
| def __init__(self, text='', text_align='left', **kwargs): | ||
| def __init__(self, text='', text_style={}, **kwargs): |
There was a problem hiding this comment.
A more proficient way to do styling would be to use css stylesheet. Otherwise we should add a style parameter for each widget in a container, like TableItem in Tables, ListItem in ListView and so on... Doesn't it?
There was a problem hiding this comment.
I don't know how to use separate stylesheets, because at the moment, there is no documentation about it ;-)
If it means that the whole original stylesheet has to be copied, I don't think it's a good idea...
Prevent margin-x overrides by setting kwarg margin=None
Add cancel_button kwarg for GenericDialog
|
@saddy001 I really like the changes you made. I will review and test this, than I will merge. Thank you for this contribution. |
|
|
||
| @decorate_constructor_parameter_types([str]) | ||
| def __init__(self, text='', **kwargs): | ||
| def __init__(self, text='', text_style={}, **kwargs): |
There was a problem hiding this comment.
mutable functions args (dict in signature) are not a good idea
There was a problem hiding this comment.
Yep. If you have your hands already on this, could you change it to None and assign
text_style = text_style or {}
?
allow treeopen keyword for TreeItem