mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Add a toggle downloads button to share mode, and add new toggle upload and download images
This commit is contained in:
parent
ddcbed451c
commit
edbbe9377c
@ -89,11 +89,20 @@ class ShareMode(Mode):
|
|||||||
self.update_downloads_completed()
|
self.update_downloads_completed()
|
||||||
self.update_downloads_in_progress()
|
self.update_downloads_in_progress()
|
||||||
|
|
||||||
|
self.info_toggle_button = QtWidgets.QPushButton()
|
||||||
|
self.info_toggle_button.setDefault(False)
|
||||||
|
self.info_toggle_button.setFixedWidth(30)
|
||||||
|
self.info_toggle_button.setFixedHeight(30)
|
||||||
|
self.info_toggle_button.setFlat(True)
|
||||||
|
self.info_toggle_button.setIcon( QtGui.QIcon(self.common.get_resource_path('images/downloads_toggle.png')) )
|
||||||
|
self.info_toggle_button.clicked.connect(self.toggle_downloads)
|
||||||
|
|
||||||
self.info_layout = QtWidgets.QHBoxLayout()
|
self.info_layout = QtWidgets.QHBoxLayout()
|
||||||
self.info_layout.addWidget(self.info_label)
|
self.info_layout.addWidget(self.info_label)
|
||||||
self.info_layout.addStretch()
|
self.info_layout.addStretch()
|
||||||
self.info_layout.addWidget(self.info_in_progress_downloads_count)
|
self.info_layout.addWidget(self.info_in_progress_downloads_count)
|
||||||
self.info_layout.addWidget(self.info_completed_downloads_count)
|
self.info_layout.addWidget(self.info_completed_downloads_count)
|
||||||
|
self.info_layout.addWidget(self.info_toggle_button)
|
||||||
|
|
||||||
self.info_widget = QtWidgets.QWidget()
|
self.info_widget = QtWidgets.QWidget()
|
||||||
self.info_widget.setLayout(self.info_layout)
|
self.info_widget.setLayout(self.info_layout)
|
||||||
@ -353,6 +362,12 @@ class ShareMode(Mode):
|
|||||||
self.info_in_progress_downloads_count.setText('<img src="{0:s}" /> {1:d}'.format(image, self.downloads_in_progress))
|
self.info_in_progress_downloads_count.setText('<img src="{0:s}" /> {1:d}'.format(image, self.downloads_in_progress))
|
||||||
self.info_in_progress_downloads_count.setToolTip(strings._('info_in_progress_downloads_tooltip', True).format(self.downloads_in_progress))
|
self.info_in_progress_downloads_count.setToolTip(strings._('info_in_progress_downloads_tooltip', True).format(self.downloads_in_progress))
|
||||||
|
|
||||||
|
def toggle_downloads(self):
|
||||||
|
"""
|
||||||
|
Toggle showing and hiding the Downloads widget
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _compute_total_size(filenames):
|
def _compute_total_size(filenames):
|
||||||
total_size = 0
|
total_size = 0
|
||||||
|
BIN
share/images/downloads_toggle.png
Normal file
BIN
share/images/downloads_toggle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 380 B |
BIN
share/images/downloads_toggle_selected.png
Normal file
BIN
share/images/downloads_toggle_selected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 468 B |
BIN
share/images/uploads_toggle.png
Normal file
BIN
share/images/uploads_toggle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 389 B |
BIN
share/images/uploads_toggle_selected.png
Normal file
BIN
share/images/uploads_toggle_selected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 473 B |
Loading…
Reference in New Issue
Block a user