| 685 | """ |
| 686 | |
| 687 | def __init__(self, title, **kwargs): |
| 688 | super(EditorAttributesGroup, self).__init__(**kwargs) |
| 689 | self.add_class('.RaisedFrame') |
| 690 | #self.style['display'] = 'block' |
| 691 | self.container = gui.HBox(width="100%", style={ |
| 692 | 'overflow': 'visible', 'justify-content': 'flex-start', 'align-items': 'flex-start', 'flex-wrap': 'wrap'}) |
| 693 | self.container.css_justify_content = 'flex-start' |
| 694 | self.opened = True |
| 695 | self.title = gui.Label(title, width='100%') |
| 696 | self.title.add_class("Title") |
| 697 | self.title.style.update({'text-indent': '25px', |
| 698 | 'background-image': "url('/editor_resources:minus.png')", |
| 699 | 'background-repeat': 'no-repeat', |
| 700 | 'background-position': '5px', |
| 701 | 'border-top': '3px solid lightgray'}) |
| 702 | self.title.onclick.do(self.openClose) |
| 703 | super(EditorAttributesGroup, self).append(self.title) |
| 704 | super(EditorAttributesGroup, self).append(self.container) |
| 705 | |
| 706 | def openClose(self, widget): |
| 707 | self.opened = not self.opened |