示例#1
0
 def css():
     css.prop.font_size        = css.pt(8)
     css.prop.font_weight      = css.values.font_weights.x500
     css.prop.font_family      = css.values.font_families.courier_new
     css.prop.padding          = css.pixel(10)
     css.margin_top            = css.pixel(15)
     css.margin_bottom         = css.pixel(15)
     css.prop.background_color = css.rgb(245,245,245)
     css.prop.border           = 'solid 3px rgb(200,200,200)'
示例#2
0
    def onfire(self, codes):
        
        if "reporter" in codes:
            pos = codes.index("reporter")
            self.report = {}
            for i in range(len(codes[pos:])/2):
                key   = codes[pos + 2*i + 1]
                value = codes[pos + 2*i + 2]
                
                if key not in self.reporter:
                    cls = object.__getattribute__(self, '__class__')
                    key = type.__getattribute__(cls, 'pod').inst_get_inst_by_id(cls = cls, inst_id = key)
                    
                if key not in self.report:
                    self.report[key] = {}
                value = value.split(".")
                if self.reporter[key] == 'pos':
                    self.report[key]['pos'] = [css.pixel(v) for v in value]
                elif self.reporter[key] == 'target':
                    cls = object.__getattribute__(self, '__class__')
                    self.report[key]['target'] = type.__getattribute__(cls, 'pod').inst_get_inst_by_id(cls = cls, inst_id = value[0])    
                else:
                    for i,att in enumerate(self.reporter[key]):
                        self.report[key][att] = value[i]
                    
            codes = codes[:pos]

        if self.value:
            value = urllib.unquote(str(codes[-1]))[1:].replace('__DOMDOM_FSLASH__', '/')
            del codes[-1]
            self.sensor.att.__setattr__('value', value, update = False)
            
        return codes
示例#3
0
文件: fx.py 项目: cart0113/catalystlc
 def onfire(self, codes = None):
     value = pixel(int(codes[0])) if self.units == '"px"' else percent(int(codes[0]))
     self.parent.style.__setattr__(key = self.type, value = value, update = False)
     self.call_handler()
示例#4
0
 def css():
     css.prop.padding_left = css.pixel(5)
示例#5
0
 def css():
     css.prop.width        = css.pixel(20)
     css.prop.padding_left = css.pixel(2)
示例#6
0
 def css():
     css.prop.vertical_align         = css.values.vertical_aligns.top        
     css.prop.padding                = css.pixel(0)
     css.prop.margin                 = '0 auto'