Skip to content

Commit

Permalink
ui style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dyang886 committed May 21, 2024
1 parent 3b4f8f4 commit f8be878
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 56 deletions.
15 changes: 15 additions & 0 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ def __init__(self, parent=None):
logoLabel = QLabel()
logoLabel.setAlignment(Qt.AlignmentFlag.AlignCenter)
logoLabel.setPixmap(scaledLogoPixmap)
if settings["theme"] == "white":
logoLabel.setStyleSheet("""
border: 2px solid black;
border-radius: 20px;
padding: -2px;
""")
appLayout.addWidget(logoLabel)

# App name and version
Expand Down Expand Up @@ -1010,6 +1016,7 @@ def run(self):

if total_pages:
completed_pages = 0
error = False
self.update.emit(statusWidgetName, f"{fetch_message} ({completed_pages}/{total_pages})", "load")

with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
Expand All @@ -1019,8 +1026,16 @@ def run(self):
result = future.result()
if result:
all_data.extend(result)
else:
error = True
completed_pages += 1
self.update.emit(statusWidgetName, f"{fetch_message} ({completed_pages}/{total_pages})", "load")

if error:
self.update.emit(statusWidgetName, fetch_error, "error")
time.sleep(2)
self.finished.emit(statusWidgetName)
return

all_data.extend(db_additions.additions)

Expand Down
94 changes: 38 additions & 56 deletions style_sheet.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
white = """
QMainWindow {{
background-color: #ffffff;
background-color: #f3f3f3;
}}
QStatusBar::item {{
border: none;
}}
QMenuBar {{
background-color: #f0f0f0;
background-color: #fbfbfd;
}}
QMenuBar::item {{
background-color: #f0f0f0;
background-color: #fbfbfd;
color: #000000;
padding: 5px;
}}
QMenuBar::item:selected {{
background-color: #cccccc;
background-color: #e2e2e2;
}}
QMenu {{
background-color: #ffffff;
background-color: #f3f3f3;
border: 2px solid #000000;
border-radius: 5px;
}}
QMenu::item {{
background-color: #ffffff;
background-color: #f3f3f3;
color: #000000;
}}
QMenu::item:selected {{
background-color: #cccccc;
background-color: #e2e2e2;
}}
QStatusBar {{
Expand All @@ -43,26 +44,34 @@
color: black;
}}
QCheckBox::indicator:unchecked {{
background-color: #fbfbfd;
border: 1px solid #5e5e5e;
border-radius: 5px;
}}
QPushButton {{
padding: 9px;
padding: 7px;
border-radius: 3px;
background-color: #e6e6e6;
border: 1px solid #e5e5e5;
background-color: #fbfbfd;
color: #000000;
outline: none;
}}
QPushButton:hover {{
background-color: #f2f2f2;
background-color: #f6f6f6;
}}
QPushButton:pressed {{
background-color: #d9d9d9;
background-color: #eaeaea;
}}
QComboBox {{
padding: 7px;
border-radius: 3px;
background-color: #e6e6e6;
border: 1px solid #e5e5e5;
background-color: #fbfbfd;
color: #000000;
}}
Expand All @@ -77,41 +86,23 @@
}}
QComboBox QAbstractItemView {{
background-color: #e6e6e6;
background-color: #fbfbfd;
color: #000000;
border: 1px solid #e5e5e5;
}}
QDialog {{
background-color: #ffffff;
background-color: #f3f3f3;
}}
QLabel {{
color: #000000;
}}
QTabWidget::pane {{
border-top: 2px solid #f0f0f0;
}}
QTabBar::tab {{
background-color: #e6e6e6;
color: #000000;
padding: 10px;
border-radius: 3px;
}}
QTabBar::tab:hover {{
background-color: #f2f2f2;
}}
QTabBar::tab:selected {{
background-color: #d9d9d9;
}}
QLineEdit {{
background-color: #e6e6e6;
background-color: #fbfbfd;
color: #000000;
border: 1px solid #aaaaaa;
border: 1px solid #e5e5e5;
border-radius: 3px;
padding: 6px;
}}
Expand All @@ -123,7 +114,7 @@
QListWidget {{
border: 1px solid #8c8c8c;
border-radius: 3px;
background-color: #e6e6e6;
background-color: #fbfbfd;
color: #000000;
}}
Expand Down Expand Up @@ -244,6 +235,7 @@
QMenu {{
background-color: #1c1c1c;
border: 2px solid #ffffff;
border-radius: 5px;
}}
QMenu::item {{
Expand All @@ -263,9 +255,16 @@
color: white;
}}
QCheckBox::indicator:unchecked {{
background-color: #2a2a2a;
border: 1px solid #5e5e5e;
border-radius: 5px;
}}
QPushButton {{
padding: 9px;
padding: 7px;
border-radius: 3px;
border: 1px solid #555555;
background-color: #2a2a2a;
color: #FFFFFF;
outline: none;
Expand All @@ -282,6 +281,7 @@
QComboBox {{
padding: 7px;
border-radius: 3px;
border: 1px solid #555555;
background-color: #2a2a2a;
color: #FFFFFF;
}}
Expand All @@ -299,6 +299,7 @@
QComboBox QAbstractItemView {{
background-color: #2a2a2a;
color: #FFFFFF;
border: 1px solid #555555;
}}
QDialog {{
Expand All @@ -309,25 +310,6 @@
color: #FFFFFF;
}}
QTabWidget::pane {{
border-top: 2px solid #2e2e2e;
}}
QTabBar::tab {{
background-color: #2a2a2a;
color: #FFFFFF;
padding: 10px;
border-radius: 3px;
}}
QTabBar::tab:hover {{
background-color: #2f2f2f;
}}
QTabBar::tab:selected {{
background-color: #232323;
}}
QLineEdit {{
background-color: #2a2a2a;
color: #FFFFFF;
Expand Down

0 comments on commit f8be878

Please sign in to comment.