NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

line.py (837B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\carbonui\primitives\line.py
      2 import carbonui.const as uiconst
      3 from .fill import Fill
      4 
      5 class Line(Fill):
      6     __guid__ = 'uiprimitives.Line'
      7     default_name = 'line'
      8     default_weight = 1
      9     default_align = uiconst.TOTOP
     10     default_color = (1.0, 1.0, 1.0, 0.15)
     11     default_state = uiconst.UI_DISABLED
     12 
     13     def ApplyAttributes(self, attributes):
     14         Fill.ApplyAttributes(self, attributes)
     15         if self.align in (uiconst.TOTOP,
     16          uiconst.TOBOTTOM,
     17          uiconst.TOLEFT,
     18          uiconst.TORIGHT,
     19          uiconst.TOTOP_NOPUSH,
     20          uiconst.TOBOTTOM_NOPUSH,
     21          uiconst.TOLEFT_NOPUSH,
     22          uiconst.TORIGHT_NOPUSH):
     23             weight = attributes.get('weight', self.default_weight)
     24             self.SetSize(weight, weight)