def wrapVO(items):
     result = {}
     if items:
         result = {
             'items':
             items,
             'isEnabled':
             True,
             'topTitle':
             text_styles.concatStylesToSingleLine(
                 icons.makeImageTag(source=backport.image(
                     R.images.gui.maps.icons.library.icon_gift()),
                                    width=17,
                                    height=15,
                                    vSpace=0),
                 text_styles.vehicleStatusCriticalTextSmall(
                     VEHICLE_PREVIEW.BUYINGPANEL_PRESENT)),
             'topTitleSmall':
             icons.makeImageTag(source=backport.image(
                 R.images.gui.maps.icons.library.icon_gift()),
                                width=17,
                                height=15,
                                vSpace=0)
         }
     return result
Пример #2
0
 def _getGiftBlock(self):
     lineBlock = formatters.packImageBlockData(
         align=BLOCKS_TOOLTIP_TYPES.ALIGN_CENTER,
         img=backport.image(R.images.gui.maps.icons.tooltip.line()))
     textBlock = formatters.packTextWithBgBlockData(
         text=text_styles.concatStylesToSingleLine(
             icons.makeImageTag(source=backport.image(
                 R.images.gui.maps.icons.library.icon_gift()),
                                width=17,
                                height=15,
                                vSpace=0),
             text_styles.vehicleStatusCriticalTextSmall(
                 TOOLTIPS.FRONTLINEPACKPREVIEW_GIFT)),
         bgColor=0,
         align=BLOCKS_TOOLTIP_TYPES.ALIGN_CENTER)
     return formatters.packBuildUpBlockData(
         blocks=[lineBlock, textBlock],
         gap=-13,
         blockWidth=_PREVIEW_TOOLTIP_WIDTH,
         layout=BLOCKS_TOOLTIP_TYPES.LAYOUT_VERTICAL,
         align=BLOCKS_TOOLTIP_TYPES.ALIGN_CENTER)