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

underlay.py (1050B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\carbonui\window\segment\underlay.py
      2 from carbonui.primitives.container import Container
      3 from carbonui.primitives.fill import Fill
      4 from carbonui.uianimations import animations
      5 from carbonui.util.various_unsorted import GetWindowAbove
      6 from eve.client.script.ui import eveThemeColor
      7 OPACITY_IDLE = 0.05
      8 OPACITY_ACTIVE = 0.2
      9 
     10 class WindowSegmentUnderlay(Container):
     11 
     12     def ApplyAttributes(self, attributes):
     13         super(WindowSegmentUnderlay, self).ApplyAttributes(attributes)
     14         wnd = GetWindowAbove(self)
     15         self._background = Fill(bgParent=self, color=eveThemeColor.THEME_TINT, opacity=OPACITY_ACTIVE if wnd and wnd.active else OPACITY_IDLE)
     16 
     17     def OnWindowAboveSetActive(self):
     18         animations.FadeTo(self._background, startVal=self._background.opacity, endVal=OPACITY_ACTIVE, duration=0.3)
     19 
     20     def OnWindowAboveSetInactive(self):
     21         animations.FadeTo(self._background, startVal=self._background.opacity, endVal=OPACITY_IDLE, duration=0.3)