diff --git a/app/infotabs.py b/app/infotabs.py index 1f14f95..c216f3d 100644 --- a/app/infotabs.py +++ b/app/infotabs.py @@ -21,6 +21,14 @@ class InfoTabs(QTabWidget): # re-use the oldest one later) self.last_update: Dict[QWebEngineView, datetime] = {} self.tabtitles: Dict[int, str] = {} + count = Config.MAX_INFO_TABS + while count: + widget = QWebEngineView() + widget.setZoomFactor(Config.WEB_ZOOM_FACTOR) + self.last_update[widget] = datetime.now() + tab_index = self.addTab(widget, "") + count -= 1 + def open_in_songfacts(self, title): """Search Songfacts for title""" diff --git a/app/musicmuster.py b/app/musicmuster.py index 308f92b..52d471a 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -1637,7 +1637,7 @@ class Window(QMainWindow, Ui_MainWindow): # because it isn't quick if self.next_track.title: QTimer.singleShot( - 1, + 0, lambda: self.tabInfolist.open_in_wikipedia( self.next_track.title ), diff --git a/app/ui/main_window.ui b/app/ui/main_window.ui index 94cee40..538a6d6 100644 --- a/app/ui/main_window.ui +++ b/app/ui/main_window.ui @@ -363,6 +363,9 @@ padding-left: 8px; true + + false + diff --git a/app/ui/main_window_ui.py b/app/ui/main_window_ui.py index b062af1..40adf63 100644 --- a/app/ui/main_window_ui.py +++ b/app/ui/main_window_ui.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'app/ui/main_window.ui' # -# Created by: PyQt6 UI code generator 6.5.1 +# Created by: PyQt6 UI code generator 6.5.2 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -183,6 +183,7 @@ class Ui_MainWindow(object): self.tabInfolist.setDocumentMode(False) self.tabInfolist.setTabsClosable(True) self.tabInfolist.setMovable(True) + self.tabInfolist.setTabBarAutoHide(False) self.tabInfolist.setObjectName("tabInfolist") self.gridLayout_4.addWidget(self.splitter, 4, 0, 1, 1) self.InfoFooterFrame = QtWidgets.QFrame(parent=self.centralwidget)