From c51fc9ea4acb7eafdf48e7284e22d6ef04c20dfd Mon Sep 17 00:00:00 2001 From: KeksNino Date: Sat, 31 Jan 2026 05:49:30 +0100 Subject: [PATCH] feat: remove toolbar, will be improved later --- core/interface/gui.py | 32 +++++++++++++++---------------- core/interface/utils/tabhelper.py | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/interface/gui.py b/core/interface/gui.py index 64c0945..f4891f1 100644 --- a/core/interface/gui.py +++ b/core/interface/gui.py @@ -393,29 +393,29 @@ class MainWindow(QtWidgets.QMainWindow, QWidget): # temporarily disabled # state.image_changed.connect(self.update_image_overlay) - containerLayout.addWidget(self.tabs) - - containerLayout.setAlignment(Qt.AlignmentFlag.AlignBottom) - toolbar = QToolBar("Main Toolbar") - self.addToolBar(toolbar) - toolbar.setLayoutDirection(Qt.RightToLeft) - self.tracker_list = QComboBox() self.tracker_list.addItems(["rutracker", "uztracker", "m0nkrus"]) + self.tracker_list.setFixedSize(90, 30) self.tracker_list.activated.connect(self.set_tracker) + topLayout = QHBoxLayout() + if darkdetect.isDark(): - settings_action = QAction(QIcon(get_asset_path("settings_white.png")), "Settings", self) + settings_button = QtWidgets.QPushButton(QIcon(get_asset_path("settings_white.png")), "") else: - settings_action = QAction(QIcon(get_asset_path("settings_black.png")), "Settings", self) + settings_button = QtWidgets.QPushButton(QIcon(get_asset_path("settings_black.png")), "") + + settings_button.clicked.connect(lambda: settings_dialog(self)) + settings_button.setFixedSize(32, 32) + settings_button.setToolTip("Settings") + + topLayout.addWidget(self.tracker_list) + topLayout.addStretch() + topLayout.addWidget(settings_button) + + containerLayout.addLayout(topLayout) + containerLayout.addWidget(self.tabs) - settings_action.triggered.connect(lambda: settings_dialog(self)) - toolbar.addAction(settings_action) - toolbar.addWidget(self.tracker_list) - - toolbar.setMovable(False) - - # self.progressbar.setValue(0) self.consoleLog.setReadOnly(True) self.consoleLog.setFixedHeight(150) containerLayout.addWidget(self.consoleLog) diff --git a/core/interface/utils/tabhelper.py b/core/interface/utils/tabhelper.py index e424b3f..6828918 100644 --- a/core/interface/utils/tabhelper.py +++ b/core/interface/utils/tabhelper.py @@ -12,6 +12,6 @@ def create_tab(title, searchbar, software_list, tabs, dlbutton, layout2): layout.addWidget(software_list) if dlbutton: layout.addWidget(dlbutton) - tab.setLayout(layout) + tab.setLayout(layout) tabs.addTab(tab, title) return tab