(self, skip_tab=None)
| 1371 | self.UpdateTabsPosition() |
| 1372 | |
| 1373 | def UpdateTabsPosition(self, skip_tab=None): |
| 1374 | tabsWidth = 0 |
| 1375 | for tab in self.tabs: |
| 1376 | tabsWidth += tab.tab_width - self.inclination * 2 |
| 1377 | |
| 1378 | pos = tabsWidth |
| 1379 | selected = None |
| 1380 | for i in range(len(self.tabs) - 1, -1, -1): |
| 1381 | tab = self.tabs[i] |
| 1382 | width = tab.tab_width - self.inclination * 2 |
| 1383 | pos -= width |
| 1384 | if not tab.IsSelected(): |
| 1385 | tab.SetPosition((pos, self.container_height - self.height)) |
| 1386 | else: |
| 1387 | selected = tab |
| 1388 | selpos = pos |
| 1389 | |
| 1390 | if selected is not skip_tab: |
| 1391 | selected.SetPosition((selpos, self.container_height - self.height)) |
| 1392 | |
| 1393 | self.add_button.SetPosition((round(tabsWidth) + self.inclination * 2, |
| 1394 | self.container_height - self.height / 2 - self.add_button.GetHeight() / 3)) |
| 1395 | |
| 1396 | def OnLeaveWindow(self, event): |
| 1397 | if self.start_drag and not self.dragging: |
no test coverage detected