Improve icons with FA and better dark/light mode. Change 'Ready to [mode]' to 'Stopped' for clearer UX

This commit is contained in:
Miguel Jacq 2025-02-16 10:03:11 +11:00
parent 4fbe981c31
commit fb4acaf39c
No known key found for this signature in database
GPG Key ID: 59B3F0C24135C6A9
30 changed files with 26 additions and 20 deletions

View File

@ -81,7 +81,7 @@ class MainWindow(QtWidgets.QMainWindow):
# Server status indicator icons
self.status_bar.server_status_image_stopped = QtGui.QImage(
GuiCommon.get_resource_path("images/server_stopped.png")
GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_server_stopped.png")
)
self.status_bar.server_status_image_working = QtGui.QImage(
GuiCommon.get_resource_path("images/server_working.png")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -131,15 +131,15 @@
"gui_url_instructions": "First, send the OnionShare address below:",
"gui_url_instructions_public_mode": "Send the OnionShare address below:",
"gui_client_auth_instructions": "Next, send the private key to allow access to your OnionShare service:",
"gui_status_indicator_share_stopped": "Ready to share",
"gui_status_indicator_share_stopped": "Stopped",
"gui_status_indicator_share_working": "Starting…",
"gui_status_indicator_share_scheduled": "Scheduled…",
"gui_status_indicator_share_started": "Sharing",
"gui_status_indicator_receive_stopped": "Ready to receive",
"gui_status_indicator_receive_stopped": "Stopped",
"gui_status_indicator_receive_working": "Starting…",
"gui_status_indicator_receive_scheduled": "Scheduled…",
"gui_status_indicator_receive_started": "Receiving",
"gui_status_indicator_chat_stopped": "Ready to chat",
"gui_status_indicator_chat_stopped": "Stopped",
"gui_status_indicator_chat_working": "Starting…",
"gui_status_indicator_chat_scheduled": "Scheduled…",
"gui_status_indicator_chat_started": "Chatting",

View File

@ -788,10 +788,10 @@ class History(QtWidgets.QWidget):
Update the 'completed' widget.
"""
if self.completed_count == 0:
image = GuiCommon.get_resource_path("images/history_completed_none.png")
image = GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_completed_none.png")
else:
image = GuiCommon.get_resource_path("images/history_completed.png")
self.completed_label.setText(f'<img src="{image}" /> {self.completed_count}')
self.completed_label.setText(f'<img src="{image}" height="10" /> {self.completed_count}')
self.completed_label.setToolTip(
strings._("history_completed_tooltip").format(self.completed_count)
)
@ -801,12 +801,12 @@ class History(QtWidgets.QWidget):
Update the 'in progress' widget.
"""
if self.in_progress_count == 0:
image = GuiCommon.get_resource_path("images/history_in_progress_none.png")
image = GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_in_progress_none.png")
else:
image = GuiCommon.get_resource_path("images/history_in_progress.png")
self.in_progress_label.setText(
f'<img src="{image}" /> {self.in_progress_count}'
f'<img src="{image}" height="10" /> {self.in_progress_count}'
)
self.in_progress_label.setToolTip(
strings._("history_in_progress_tooltip").format(self.in_progress_count)
@ -817,11 +817,11 @@ class History(QtWidgets.QWidget):
Update the 'web requests' widget.
"""
if self.requests_count == 0:
image = GuiCommon.get_resource_path("images/history_requests_none.png")
image = GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_requests_none.png")
else:
image = GuiCommon.get_resource_path("images/history_requests.png")
self.requests_label.setText(f'<img src="{image}" /> {self.requests_count}')
self.requests_label.setText(f'<img src="{image}" height="10" /> {self.requests_count}')
self.requests_label.setToolTip(
strings._("history_requests_tooltip").format(self.requests_count)
)

View File

@ -160,9 +160,9 @@ class ReceiveMode(Mode):
self.common,
self,
self.history,
QtGui.QIcon(GuiCommon.get_resource_path("images/receive_icon_toggle.png")),
QtGui.QIcon(GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_icon_toggle.png")),
QtGui.QIcon(
GuiCommon.get_resource_path("images/receive_icon_toggle_selected.png")
GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_icon_toggle_selected.png")
),
)

View File

@ -135,9 +135,9 @@ class ShareMode(Mode):
self.common,
self,
self.history,
QtGui.QIcon(GuiCommon.get_resource_path("images/share_icon_toggle.png")),
QtGui.QIcon(GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_icon_toggle.png")),
QtGui.QIcon(
GuiCommon.get_resource_path("images/share_icon_toggle_selected.png")
GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_icon_toggle_selected.png")
),
)

View File

@ -157,9 +157,9 @@ class WebsiteMode(Mode):
self.common,
self,
self.history,
QtGui.QIcon(GuiCommon.get_resource_path("images/share_icon_toggle.png")),
QtGui.QIcon(GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_icon_toggle.png")),
QtGui.QIcon(
GuiCommon.get_resource_path("images/share_icon_toggle_selected.png")
GuiCommon.get_resource_path(f"images/{self.common.gui.color_mode}_history_icon_toggle_selected.png")
),
)

View File

@ -480,23 +480,29 @@ class Tab(QtWidgets.QWidget):
)
def set_server_status_indicator_stopped(self, label_text):
self.change_icon.emit(self.tab_id, "images/server_stopped.png")
self.change_icon.emit(self.tab_id, f"images/{self.common.gui.color_mode}_server_stopped.png")
image = self.status_bar.server_status_image_stopped
scaled_image = image.scaledToHeight(15, QtCore.Qt.SmoothTransformation)
self.status_bar.server_status_image_label.setPixmap(
QtGui.QPixmap.fromImage(self.status_bar.server_status_image_stopped)
QtGui.QPixmap.fromImage(scaled_image)
)
self.status_bar.server_status_label.setText(label_text)
def set_server_status_indicator_working(self, label_text):
self.change_icon.emit(self.tab_id, "images/server_working.png")
image = self.status_bar.server_status_image_working
scaled_image = image.scaledToHeight(15, QtCore.Qt.SmoothTransformation)
self.status_bar.server_status_image_label.setPixmap(
QtGui.QPixmap.fromImage(self.status_bar.server_status_image_working)
QtGui.QPixmap.fromImage(scaled_image)
)
self.status_bar.server_status_label.setText(label_text)
def set_server_status_indicator_started(self, label_text):
self.change_icon.emit(self.tab_id, "images/server_started.png")
image = self.status_bar.server_status_image_started
scaled_image = image.scaledToHeight(15, QtCore.Qt.SmoothTransformation)
self.status_bar.server_status_image_label.setPixmap(
QtGui.QPixmap.fromImage(self.status_bar.server_status_image_started)
QtGui.QPixmap.fromImage(scaled_image)
)
self.status_bar.server_status_label.setText(label_text)