(self, parent, wrapper)
| 29 | class StylePickerPopup(wx.PopupTransientWindow): |
| 30 | |
| 31 | def __init__(self, parent, wrapper): |
| 32 | super().__init__(parent, flags=wx.BORDER_SIMPLE) |
| 33 | self.wrapper = wrapper |
| 34 | |
| 35 | self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)) |
| 36 | sizer = wx.BoxSizer(wx.VERTICAL) |
| 37 | |
| 38 | grid = wx.GridSizer(self.nrows, self.ncols, 0, 0) |
| 39 | self.patches = list() |
| 40 | for styleID in self.sortingOrder: |
| 41 | styleData = self.styleContainer[styleID] |
| 42 | icon = wx.StaticBitmap(self, wx.ID_ANY, BitmapLoader.getBitmap(styleData.iconName, 'gui')) |
| 43 | icon.styleID = styleID |
| 44 | icon.SetToolTip(styleData.name) |
| 45 | icon.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) |
| 46 | grid.Add(icon, flag=wx.ALL, border=3) |
| 47 | sizer.Add(grid) |
| 48 | |
| 49 | self.SetSizer(sizer) |
| 50 | self.Fit() |
| 51 | self.Layout() |
| 52 | |
| 53 | @property |
| 54 | def styleContainer(self): |
nothing calls this directly
no test coverage detected