Minor UI improvements:

1. removed underlines from hyperlinks. also changed color of hyperlinks to #0000FF
2. index number column width size now fixed
3. column titles now have bold font
This commit is contained in:
Bernd 2025-07-21 12:55:55 +05:00
parent b71e2bbb55
commit 2b57046837
2 changed files with 16 additions and 6 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@ anime_backlog.db
images/
__pycache__/
anime_tracker.log
todo.txt
*.csv

View File

@ -306,17 +306,21 @@ class AnimeTracker(QMainWindow):
table.setSelectionBehavior(QAbstractItemView.SelectRows)
table.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
table.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
header.setSectionResizeMode(0, QHeaderView.ResizeToContents) # ID hidden
header.setSectionResizeMode(0, QHeaderView.Fixed) # ID hidden
header.setSectionResizeMode(1, QHeaderView.ResizeToContents) # Year
header.setSectionResizeMode(2, QHeaderView.Stretch) # Name
header.setSectionResizeMode(3, QHeaderView.ResizeToContents) # Type
header.setSectionResizeMode(4, QHeaderView.ResizeToContents) # Status
header.setSectionResizeMode(5, QHeaderView.Stretch) # Comment
header.setSectionResizeMode(6, QHeaderView.ResizeToContents) # Actions
table.setColumnWidth(0, 0) # Set ID column width to 0 to ensure it's hidden
font = QFont()
font.setPointSize(int(10 * self.table_scale))
header_font = QFont()
header_font.setPointSize(int(10 * self.table_scale))
header_font.setBold(True)
table.setFont(font)
table.horizontalHeader().setFont(font)
table.horizontalHeader().setFont(header_font)
table.verticalHeader().setFont(font)
for row, entry in enumerate(pre_entries):
col = 0
@ -335,7 +339,7 @@ class AnimeTracker(QMainWindow):
name_label = QLabel()
if url:
name_escaped = html.escape(name)
name_label.setText(f'<a href="{url}">{name_escaped}</a>')
name_label.setText(f'<a href="{url}" style="color: #0000FF; text-decoration: none;">{name_escaped}</a>')
name_label.setOpenExternalLinks(True)
else:
name_label.setText(html.escape(name))
@ -439,16 +443,20 @@ class AnimeTracker(QMainWindow):
table.setSelectionBehavior(QAbstractItemView.SelectRows)
table.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
table.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
header.setSectionResizeMode(0, QHeaderView.ResizeToContents) # ID hidden
header.setSectionResizeMode(0, QHeaderView.Fixed) # ID hidden
header.setSectionResizeMode(1, QHeaderView.Stretch) # Name
header.setSectionResizeMode(2, QHeaderView.ResizeToContents) # Type
header.setSectionResizeMode(3, QHeaderView.ResizeToContents) # Status
header.setSectionResizeMode(4, QHeaderView.Stretch) # Comment
header.setSectionResizeMode(5, QHeaderView.ResizeToContents) # Actions
table.setColumnWidth(0, 0) # Set ID column width to 0 to ensure it's hidden
font = QFont()
font.setPointSize(int(10 * self.table_scale))
header_font = QFont()
header_font.setPointSize(int(10 * self.table_scale))
header_font.setBold(True)
table.setFont(font)
table.horizontalHeader().setFont(font)
table.horizontalHeader().setFont(header_font)
table.verticalHeader().setFont(font)
for row, entry in enumerate(entries):
col = 0
@ -462,7 +470,7 @@ class AnimeTracker(QMainWindow):
name_label = QLabel()
if url:
name_escaped = html.escape(name)
name_label.setText(f'<a href="{url}">{name_escaped}</a>')
name_label.setText(f'<a href="{url}" style="color: #0000FF; text-decoration: none;">{name_escaped}</a>')
name_label.setOpenExternalLinks(True)
else:
name_label.setText(html.escape(name))