1. enlarge fonts for table season titles (e.g. winter, spring).

2. make names italic when status is 'watching'
This commit is contained in:
Bernd 2025-07-21 14:50:40 +05:00
parent 2b57046837
commit b0b3f177b3
13 changed files with 29 additions and 3 deletions

View File

@ -337,13 +337,23 @@ class AnimeTracker(QMainWindow):
name = entry[1] name = entry[1]
url = entry[7] url = entry[7]
name_label = QLabel() name_label = QLabel()
name_font = QFont(font)
if entry[4] == 'watching':
name_font.setItalic(True)
elif entry[4] == 'completed':
name_font.setStrikeOut(True)
name_label.setFont(name_font)
if url: if url:
name_escaped = html.escape(name) name_escaped = html.escape(name)
name_label.setText(f'<a href="{url}" style="color: #0000FF; text-decoration: none;">{name_escaped}</a>') name_label.setText(f'<a href="{url}" style="color: #0000FF; text-decoration: none;">{name_escaped}</a>')
name_label.setOpenExternalLinks(True) name_label.setOpenExternalLinks(True)
else: else:
name_label.setText(html.escape(name)) name_label.setText(html.escape(name))
name_label.setFont(font) name_label.setStyleSheet("padding-left: 10px;")
if entry[4] == 'watching':
name_label.setStyleSheet("padding-left: 10px; background-color: yellow;")
elif entry[4] == 'completed':
name_label.setStyleSheet("padding-left: 10px; background-color: green;")
table.setCellWidget(row, col, name_label) table.setCellWidget(row, col, name_label)
col += 1 col += 1
# Type # Type
@ -429,6 +439,10 @@ class AnimeTracker(QMainWindow):
if entries: if entries:
s_name = season.capitalize() if season else 'Other' s_name = season.capitalize() if season else 'Other'
label = QLabel(s_name) label = QLabel(s_name)
season_font = QFont()
season_font.setPointSize(int(12 * self.table_scale))
season_font.setBold(True)
label.setFont(season_font)
layout.addWidget(label) layout.addWidget(label)
table = CustomTableWidget(self, is_pre=False) table = CustomTableWidget(self, is_pre=False)
table.setRowCount(len(entries)) table.setRowCount(len(entries))
@ -468,13 +482,23 @@ class AnimeTracker(QMainWindow):
name = entry[1] name = entry[1]
url = entry[7] url = entry[7]
name_label = QLabel() name_label = QLabel()
name_font = QFont(font)
if entry[4] == 'watching':
name_font.setItalic(True)
elif entry[4] == 'completed':
name_font.setStrikeOut(True)
name_label.setFont(name_font)
if url: if url:
name_escaped = html.escape(name) name_escaped = html.escape(name)
name_label.setText(f'<a href="{url}" style="color: #0000FF; text-decoration: none;">{name_escaped}</a>') name_label.setText(f'<a href="{url}" style="color: #0000FF; text-decoration: none;">{name_escaped}</a>')
name_label.setOpenExternalLinks(True) name_label.setOpenExternalLinks(True)
else: else:
name_label.setText(html.escape(name)) name_label.setText(html.escape(name))
name_label.setFont(font) name_label.setStyleSheet("padding-left: 10px;")
if entry[4] == 'watching':
name_label.setStyleSheet("padding-left: 10px; background-color: yellow;")
elif entry[4] == 'completed':
name_label.setStyleSheet("padding-left: 10px; background-color: green;")
table.setCellWidget(row, col, name_label) table.setCellWidget(row, col, name_label)
col += 1 col += 1
# Type # Type
@ -523,7 +547,9 @@ class AnimeTracker(QMainWindow):
if item: if item:
item.setBackground(color) item.setBackground(color)
widget = table.cellWidget(r, c) widget = table.cellWidget(r, c)
if widget: if widget and c != 5: # No padding for action column
widget.setStyleSheet(f"background-color: {color.name()}; padding-left: 0px;")
elif widget:
widget.setStyleSheet(f"background-color: {color.name()};") widget.setStyleSheet(f"background-color: {color.name()};")
layout.addWidget(table) layout.addWidget(table)
total_entries += len(entries) total_entries += len(entries)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB