Esempio n. 1
0
 def LoadTooltip(self, bracket, overlaps, boundingBox, overlapSites, *args,
                 **kwds):
     self.overlaps = overlaps
     self.overlapSites = overlapSites
     self.scrollEnabled = False if self.GetNumberOfBrackets(
     ) <= 15 else True
     bracket.SetOrder(0)
     self.SetBackgroundAlpha(TOOLTIP_OPACITY)
     isFloating = bracket.IsFloating()
     if isFloating:
         self.isCompact = settings.user.ui.Get('bracketmenu_floating', True)
     else:
         self.isCompact = settings.user.ui.Get('bracketmenu_docked', False)
     self.LoadGeneric1ColumnTemplate()
     scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
     scroll.isTabStop = False
     scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
     scroll.verticalScrollBar.width = 3
     self.scroll = scroll
     subGrid = LayoutGrid(parent=scroll,
                          align=uiconst.TOPLEFT,
                          columns=1 if self.isCompact else 3,
                          name='bracketTooltipSubGrid')
     self.subGrid = subGrid
     if self.isCompact:
         self.sideContainer = BracketTooltipSidePanel(
             align=uiconst.TOPLEFT,
             parent=self.parent,
             idx=self.parent.children.index(self))
         self.sideContainer.display = False
         uthread.new(self.UpdateSideContainer)
     self.LoadEntries()
     self.state = uiconst.UI_NORMAL
Esempio n. 2
0
    def LoadTooltip(self, *args, **kwds):
        if self.owner.markerObject.markerHandler.IsMarkerPickOverridden():
            return
        sortList = []
        overlapMarkers = self.owner.markerObject.markerHandler.GetIntersectingMarkersForMarker(
            self.owner.markerObject)
        if overlapMarkers:
            for markerObject in overlapMarkers:
                if not markerObject.tooltipRowClass:
                    continue
                sortList.append(
                    (markerObject.GetOverlapSortValue(), markerObject))

        if len(sortList) == 1:
            return
        self.overlappingMarkers = sortList
        self.SetBackgroundAlpha(TOOLTIP_OPACITY)
        self.margin = 3
        scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
        scroll.isTabStop = False
        scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
        scroll.verticalScrollBar.width = 3
        self.scroll = scroll
        subGrid = LayoutGrid(parent=scroll,
                             align=uiconst.TOPLEFT,
                             columns=1,
                             name='markersTooltipSubGrid')
        self.subGrid = subGrid
        self.sideContainer = BracketTooltipSidePanel(
            align=uiconst.TOPLEFT,
            parent=self.parent,
            idx=self.parent.children.index(self))
        self.sideContainer.display = False
        uthread.new(self.UpdateSideContainer)
        self.LoadEntries()
    def LoadTooltip(self, *args, **kwds):
        if self.owner.markerObject.markerHandler.IsMarkerPickOverridden():
            return
        sortList = []
        overlapMarkers = self.owner.markerObject.markerHandler.GetIntersectingMarkersForMarker(self.owner.markerObject)
        if overlapMarkers:
            for markerObject in overlapMarkers:
                if not markerObject.tooltipRowClass:
                    continue
                sortList.append((markerObject.GetOverlapSortValue(), markerObject))

        if len(sortList) == 1:
            return
        self.overlappingMarkers = sortList
        self.SetBackgroundAlpha(TOOLTIP_OPACITY)
        self.margin = 3
        scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
        scroll.isTabStop = False
        scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
        scroll.verticalScrollBar.width = 3
        self.scroll = scroll
        subGrid = LayoutGrid(parent=scroll, align=uiconst.TOPLEFT, columns=1, name='markersTooltipSubGrid')
        self.subGrid = subGrid
        self.sideContainer = BracketTooltipSidePanel(align=uiconst.TOPLEFT, parent=self.parent, idx=self.parent.children.index(self))
        self.sideContainer.display = False
        uthread.new(self.UpdateSideContainer)
        self.LoadEntries()
 def LoadTooltip(self, bracket, overlaps, boundingBox, overlapSites, *args, **kwds):
     self.overlaps = overlaps
     self.overlapSites = overlapSites
     self.scrollEnabled = False if self.GetNumberOfBrackets() <= 15 else True
     bracket.SetOrder(0)
     self.SetBackgroundAlpha(TOOLTIP_OPACITY)
     isFloating = bracket.IsFloating()
     if isFloating:
         self.isCompact = settings.user.ui.Get('bracketmenu_floating', True)
     else:
         self.isCompact = settings.user.ui.Get('bracketmenu_docked', False)
     self.LoadGeneric1ColumnTemplate()
     scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
     scroll.isTabStop = False
     scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
     scroll.verticalScrollBar.width = 3
     self.scroll = scroll
     subGrid = LayoutGrid(parent=scroll, align=uiconst.TOPLEFT, columns=1 if self.isCompact else 3, name='bracketTooltipSubGrid')
     self.subGrid = subGrid
     if self.isCompact:
         self.sideContainer = BracketTooltipSidePanel(align=uiconst.TOPLEFT, parent=self.parent, idx=self.parent.children.index(self))
         self.sideContainer.display = False
         uthread.new(self.UpdateSideContainer)
     self.LoadEntries()
     self.state = uiconst.UI_NORMAL