(self, widget, attributeName, propertyDef, attributeDict, appInstance, *args, **kwargs)
| 966 | |
| 967 | class EditorAttributeInputCssSize(EditorAttributeInputBase): |
| 968 | def __init__(self, widget, attributeName, propertyDef, attributeDict, appInstance, *args, **kwargs): |
| 969 | super(EditorAttributeInputCssSize, self).__init__( |
| 970 | widget, attributeName, propertyDef, attributeDict, appInstance, *args, **kwargs) |
| 971 | self.numInput = gui.SpinBox( |
| 972 | '0', -999999999, 999999999, 1, width='100%', height='100%') |
| 973 | self.numInput.onchange.do(self.onchange) |
| 974 | self.numInput.style['text-align'] = 'right' |
| 975 | |
| 976 | self.dropMeasureUnit = gui.DropDown(width='100%', height='100%') |
| 977 | self.dropMeasureUnit.append(gui.DropDownItem('px'), 'px') |
| 978 | self.dropMeasureUnit.append(gui.DropDownItem('%'), '%') |
| 979 | self.dropMeasureUnit.select_by_key('px') |
| 980 | self.dropMeasureUnit.onchange.do(self.onchange) |
| 981 | ''' |
| 982 | self.set_from_asciiart(""" |
| 983 | |del|lbl |input |meas | |
| 984 | """) |
| 985 | ''' |
| 986 | self.style.update({'grid-template-columns': "6% 46% 33% 15%", |
| 987 | 'grid-template-rows': "100%", 'grid-template-areas': "'del lbl input meas'"}) |
| 988 | self.append({'del': self.removeAttribute, 'lbl': self.label, |
| 989 | 'input': self.numInput, 'meas': self.dropMeasureUnit}) |
| 990 | |
| 991 | def onchange(self, widget, new_value): |
| 992 | new_size = str(self.numInput.get_value()) + \ |
nothing calls this directly
no test coverage detected