[view] improvement: displaying the current image index as a label in the button bar (screenshots dialog)

This commit is contained in:
Vinicius Moreira
2022-02-24 10:59:24 -03:00
parent 5a1269d07f
commit e3dfa825dd
2 changed files with 6 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- UI
- upgrade summary dialog size
- screenshots: displaying the current image index as a label in the button bar (e.g: 1/3)
## [0.9.28] 2022-02-14

View File

@@ -67,6 +67,10 @@ class ScreenshotsDialog(QDialog):
self.container_buttons.layout().addWidget(self.bt_back)
self.container_buttons.layout().addWidget(new_spacer())
self.img_label = QLabel()
self.img_label.setObjectName("image_label")
self.container_buttons.layout().addWidget(self.img_label)
self.container_buttons.layout().addWidget(self.progress_bar)
self.container_buttons.layout().addWidget(new_spacer())
@@ -99,6 +103,7 @@ class ScreenshotsDialog(QDialog):
img = self.loaded_imgs[self.img_idx]
if isinstance(img, QPixmap):
self.img_label.setText(f'{self.img_idx + 1}/{len(self.screenshots)}')
self.img.setText('')
self.img.setPixmap(img)
else: