Better status bar messages

This commit is contained in:
Ignacio Serantes
2026-04-07 09:17:08 +02:00
parent 3e374a5871
commit 9685c01760
5 changed files with 140 additions and 41 deletions

View File

@@ -14,7 +14,7 @@ Classes:
MainWindow: The main application window containing the thumbnail grid and docks.
"""
__appname__ = "BagheeraView"
__version__ = "0.9.17"
__version__ = "0.9.18"
__author__ = "Ignacio Serantes"
__email__ = "kde@aynoa.net"
__license__ = "LGPL"
@@ -1103,6 +1103,23 @@ class MainWindow(QMainWindow):
# Bottom bar with status and controls
bot = QHBoxLayout()
self.btn_load_all = QPushButton()
self.btn_load_all.setFixedSize(24, 24)
self.btn_load_all.setFocusPolicy(Qt.NoFocus)
self.btn_load_all.clicked.connect(self.load_all_images)
self.update_load_all_button_state()
self.btn_load_all.hide()
bot.addWidget(self.btn_load_all)
self.btn_load_more = QPushButton()
self.btn_load_more.setFixedSize(24, 24)
self.btn_load_more.setFocusPolicy(Qt.NoFocus)
self.btn_load_more.setToolTip(UITexts.LOAD_MORE_TOOLTIP)
self.btn_load_more.clicked.connect(self.load_more_images)
self.btn_load_more.hide()
bot.addWidget(self.btn_load_more)
self.btn_cancel_duplicates = QPushButton()
self.btn_cancel_duplicates.setIcon(QIcon.fromTheme("process-stop"))
self.btn_cancel_duplicates.setFixedSize(22, 22)
@@ -1133,20 +1150,6 @@ class MainWindow(QMainWindow):
self.hide_progress_timer.setSingleShot(True)
self.hide_progress_timer.timeout.connect(self.progress_bar.hide)
self.btn_load_more = QPushButton("+")
self.btn_load_more.setFixedSize(24, 24)
self.btn_load_more.setFocusPolicy(Qt.NoFocus)
self.btn_load_more.setToolTip(UITexts.LOAD_MORE_TOOLTIP)
self.btn_load_more.clicked.connect(self.load_more_images)
bot.addWidget(self.btn_load_more)
self.btn_load_all = QPushButton("+a")
self.btn_load_all.setFixedSize(24, 24)
self.btn_load_all.setFocusPolicy(Qt.NoFocus)
self.btn_load_all.clicked.connect(self.load_all_images)
self.update_load_all_button_state()
bot.addWidget(self.btn_load_all)
bot.addStretch()
self.filtered_count_lbl = QLabel(UITexts.FILTERED_ZERO)
@@ -2798,7 +2801,6 @@ class MainWindow(QMainWindow):
self._scanner_total_files = count
self._is_loading = False
has_more = i < count
self.btn_load_more.setVisible(has_more)
self.btn_load_all.setVisible(has_more)
def request_more_images(self, amount):
@@ -5094,10 +5096,10 @@ class MainWindow(QMainWindow):
def update_load_all_button_state(self):
"""Updates the text and tooltip of the 'load all' button based on its state."""
if self._is_loading_all:
self.btn_load_all.setText("X")
self.btn_load_all.setIcon(QIcon.fromTheme("process-stop"))
self.btn_load_all.setToolTip(UITexts.LOAD_ALL_TOOLTIP_ALT)
else:
self.btn_load_all.setText("+a")
self.btn_load_all.setIcon(QIcon.fromTheme("media-playback-start"))
self.btn_load_all.setToolTip(UITexts.LOAD_ALL_TOOLTIP)
def _create_language_menu(self):