(self, event)
| 233 | self.EditBox.SetSize((self.cancelButtonX - self.padding - self.editX, -1)) |
| 234 | |
| 235 | def OnPaint(self, event): |
| 236 | dc = wx.AutoBufferedPaintDC(self) |
| 237 | |
| 238 | bkColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW) |
| 239 | sepColor = colorUtils.GetSuitable(bkColor, 0.2) |
| 240 | rect = self.GetRect() |
| 241 | |
| 242 | if self.resized: |
| 243 | self.bkBitmap = drawUtils.RenderGradientBar(bkColor, rect.width, rect.height, 0.1, 0.1, 0.2, 2) |
| 244 | self.UpdateElementsPos(dc) |
| 245 | self.resized = False |
| 246 | |
| 247 | dc.DrawBitmap(self.bkBitmap, 0, 0) |
| 248 | |
| 249 | if self.isSearchButtonVisible: |
| 250 | if self.searchBitmap: |
| 251 | if self.searchButtonPressed: |
| 252 | spad = 1 |
| 253 | else: |
| 254 | spad = 0 |
| 255 | |
| 256 | dc.DrawBitmap(self.searchBitmapShadow, round(self.searchButtonX + 1), round(self.searchButtonY + 1)) |
| 257 | dc.DrawBitmap(self.searchBitmap, round(self.searchButtonX + spad), round(self.searchButtonY + spad)) |
| 258 | |
| 259 | if self.isCancelButtonVisible: |
| 260 | if self.cancelBitmap: |
| 261 | if self.cancelButtonPressed: |
| 262 | cpad = 1 |
| 263 | else: |
| 264 | cpad = 0 |
| 265 | dc.DrawBitmap(self.cancelBitmapShadow, round(self.cancelButtonX + 1), round(self.cancelButtonY + 1)) |
| 266 | dc.DrawBitmap(self.cancelBitmap, round(self.cancelButtonX + cpad), round(self.cancelButtonY + cpad)) |
| 267 | |
| 268 | dc.SetPen(wx.Pen(sepColor, 1)) |
| 269 | dc.DrawLine(0, rect.height - 1, rect.width, rect.height - 1) |
| 270 | |
| 271 | def SetSearchBitmap(self, bitmap): |
| 272 | self.searchBitmap = bitmap |
nothing calls this directly
no test coverage detected