Adds color palette in History Tab with Dark Mode

This commit is contained in:
SIDDHANT DIXIT 2021-08-15 19:25:58 +05:30
parent b6315c6bcf
commit 251012f559
2 changed files with 16 additions and 4 deletions

View File

@ -87,6 +87,10 @@ class GuiCommon:
new_tab_button_background = "#ffffff" new_tab_button_background = "#ffffff"
new_tab_button_border = "#efeff0" new_tab_button_border = "#efeff0"
new_tab_button_text_color = "#4e0d4e" new_tab_button_text_color = "#4e0d4e"
downloads_uploads_progress_bar_border_color = "#4E064F"
downloads_uploads_progress_bar_chunk_color = "#4E064F"
share_zip_progess_bar_border_color = "#4E064F"
share_zip_progess_bar_chunk_color = "#4E064F"
if color_mode == "dark": if color_mode == "dark":
header_color = "#F2F2F2" header_color = "#F2F2F2"
title_color = "#F2F2F2" title_color = "#F2F2F2"
@ -94,6 +98,7 @@ class GuiCommon:
new_tab_button_background = "#5F5F5F" new_tab_button_background = "#5F5F5F"
new_tab_button_border = "#878787" new_tab_button_border = "#878787"
new_tab_button_text_color = "#FFFFFF" new_tab_button_text_color = "#FFFFFF"
share_zip_progess_bar_border_color = "#F2F2F2"
return { return {
# OnionShareGui styles # OnionShareGui styles
@ -233,7 +238,7 @@ class GuiCommon:
"downloads_uploads_progress_bar": """ "downloads_uploads_progress_bar": """
QProgressBar { QProgressBar {
border: 1px solid """ border: 1px solid """
+ header_color + downloads_uploads_progress_bar_border_color
+ """; + """;
background-color: #ffffff !important; background-color: #ffffff !important;
text-align: center; text-align: center;
@ -242,10 +247,14 @@ class GuiCommon:
} }
QProgressBar::chunk { QProgressBar::chunk {
background-color: """ background-color: """
+ header_color + downloads_uploads_progress_bar_chunk_color
+ """; + """;
width: 10px; width: 10px;
}""", }""",
"history_default_label" : """
QLabel {
color: black;
}""",
"history_individual_file_timestamp_label": """ "history_individual_file_timestamp_label": """
QLabel { QLabel {
color: #666666; color: #666666;
@ -298,7 +307,7 @@ class GuiCommon:
"share_zip_progess_bar": """ "share_zip_progess_bar": """
QProgressBar { QProgressBar {
border: 1px solid """ border: 1px solid """
+ header_color + share_zip_progess_bar_border_color
+ """; + """;
background-color: #ffffff !important; background-color: #ffffff !important;
text-align: center; text-align: center;
@ -307,7 +316,7 @@ class GuiCommon:
QProgressBar::chunk { QProgressBar::chunk {
border: 0px; border: 0px;
background-color: """ background-color: """
+ header_color + share_zip_progess_bar_chunk_color
+ """; + """;
width: 10px; width: 10px;
}""", }""",

View File

@ -148,6 +148,7 @@ class ShareHistoryItem(HistoryItem):
# Change the label # Change the label
self.label.setText(self.get_finished_label_text(self.started_dt)) self.label.setText(self.get_finished_label_text(self.started_dt))
self.label.setStyleSheet(self.common.gui.css["history_default_label"])
self.status = HistoryItem.STATUS_FINISHED self.status = HistoryItem.STATUS_FINISHED
else: else:
@ -439,6 +440,7 @@ class ReceiveHistoryItem(HistoryItem):
# Change the label # Change the label
self.label.setText(self.get_finished_label_text(self.started)) self.label.setText(self.get_finished_label_text(self.started))
self.label.setStyleSheet(self.common.gui.css["history_default_label"])
elif data["action"] == "canceled": elif data["action"] == "canceled":
# Change the status # Change the status
@ -479,6 +481,7 @@ class IndividualFileHistoryItem(HistoryItem):
self.common.gui.css["history_individual_file_timestamp_label"] self.common.gui.css["history_individual_file_timestamp_label"]
) )
self.path_label = QtWidgets.QLabel(self.path) self.path_label = QtWidgets.QLabel(self.path)
self.path_label.setStyleSheet(self.common.gui.css["history_default_label"])
self.status_code_label = QtWidgets.QLabel() self.status_code_label = QtWidgets.QLabel()
# Progress bar # Progress bar