| 197 | return wx.Bitmap(img) |
| 198 | |
| 199 | def UpdateElementsPos(self, mdc): |
| 200 | rect = self.GetRect() |
| 201 | |
| 202 | self.toolbarx = self.padding |
| 203 | self.toolbary = (rect.height - self.toolbar.GetHeight()) / 2 |
| 204 | |
| 205 | mdc.SetFont(self.fontSmall) |
| 206 | |
| 207 | wlabel, hlabel = mdc.GetTextExtent(self.toolbar.hoverLabel) |
| 208 | |
| 209 | self.thoverx = self.toolbar.GetWidth() + self.padding |
| 210 | self.thovery = (rect.height - hlabel) / 2 |
| 211 | self.thoverw = wlabel |
| 212 | |
| 213 | self.browserBoxX = self.thoverx |
| 214 | bEditBoxWidth, bEditBoxHeight = self.BrowserSearchBox.GetSize() |
| 215 | self.browserBoxY = (rect.height - bEditBoxHeight) / 2 |
| 216 | |
| 217 | self.bEditBoxWidth = rect.width - self.browserBoxX - self.padding |
| 218 | |
| 219 | def DrawItem(self, mdc): |
| 220 | rect = self.GetRect() |