8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import Qt, QPoint, QTimer, QEvent |
10 from PyQt6.QtCore import Qt, QPoint, QTimer, QEvent |
11 from PyQt6.QtWidgets import QLabel |
11 from PyQt6.QtWidgets import QLabel |
12 |
12 |
13 from E5Gui.E5TabWidget import E5WheelTabBar |
13 from E5Gui.EricTabWidget import EricWheelTabBar |
14 from E5Gui.E5PassivePopup import E5PassivePopup, E5PassivePopupStyle |
14 from E5Gui.EricPassivePopup import EricPassivePopup, EricPassivePopupStyle |
15 |
15 |
16 import Preferences |
16 import Preferences |
17 |
17 |
18 |
18 |
19 class WebBrowserTabBar(E5WheelTabBar): |
19 class WebBrowserTabBar(EricWheelTabBar): |
20 """ |
20 """ |
21 Class implementing the tab bar of the web browser. |
21 Class implementing the tab bar of the web browser. |
22 """ |
22 """ |
23 def __init__(self, parent=None): |
23 def __init__(self, parent=None): |
24 """ |
24 """ |
54 preview = indexedBrowser.getPreview() |
54 preview = indexedBrowser.getPreview() |
55 if not preview.isNull(): |
55 if not preview.isNull(): |
56 w = self.tabSizeHint(index).width() |
56 w = self.tabSizeHint(index).width() |
57 h = int(w * currentBrowser.height() / currentBrowser.width()) |
57 h = int(w * currentBrowser.height() / currentBrowser.width()) |
58 |
58 |
59 self.__previewPopup = E5PassivePopup( |
59 self.__previewPopup = EricPassivePopup( |
60 style=E5PassivePopupStyle.STYLED, parent=self) |
60 style=EricPassivePopupStyle.STYLED, parent=self) |
61 self.__previewPopup.setFixedSize(w, h) |
61 self.__previewPopup.setFixedSize(w, h) |
62 self.__previewPopup.setCustomData("index", index) |
62 self.__previewPopup.setCustomData("index", index) |
63 |
63 |
64 label = QLabel() |
64 label = QLabel() |
65 label.setPixmap(preview.scaled(w, h)) |
65 label.setPixmap(preview.scaled(w, h)) |