@@ -74,11 +74,19 @@ def __init__(self, layout: QtWidgets.QGridLayout, match_data: Dict[str,
7474 'rating_diff' ] else "?"
7575 elo_change = QtWidgets .QLabel (str (diff ))
7676
77+ # aoe4world Link
78+ game_id = match_data ["game_id" ]
79+ link = QtWidgets .QLabel (
80+ f'<a href="https://aoe4world.com/players/{ settings .profile_id } /games/{ game_id } "> game link</a>'
81+ )
82+ link .setOpenExternalLinks (True )
83+
7784 self .widgets = (* team_widgets , map_name , date , mode , result ,
78- elo_change )
85+ elo_change , link )
7986
8087 for item in self .widgets :
81- item .setTextInteractionFlags (QtCore .Qt .TextSelectableByMouse )
88+ if item != link :
89+ item .setTextInteractionFlags (QtCore .Qt .TextSelectableByMouse )
8290 if item not in team_widgets :
8391 item .setAlignment (QtCore .Qt .AlignCenter )
8492
@@ -90,7 +98,7 @@ def add_to_layout(self, row: int):
9098 self .in_layout = True
9199 for column , widget in enumerate (self .widgets ):
92100 self .main_layout .addWidget (widget , row , column )
93- self .main_layout .addWidget (self .line , row + 1 , 0 , 1 , 7 )
101+ self .main_layout .addWidget (self .line , row + 1 , 0 , 1 , len ( self . widgets ) )
94102
95103 def remove_from_layout (self ):
96104 """ Removes its widgets from the layout"""
@@ -135,6 +143,7 @@ def __init__(self, parent):
135143 self .scroll_layout .addWidget (QtWidgets .QLabel ("Mode" ), 0 , 4 )
136144 self .scroll_layout .addWidget (QtWidgets .QLabel ("Result" ), 0 , 5 )
137145 self .scroll_layout .addWidget (QtWidgets .QLabel ("Rating diff" ), 0 , 6 )
146+ self .scroll_layout .addWidget (QtWidgets .QLabel ("AoE4World" ), 0 , 7 )
138147
139148 self .header_widgets = set ()
140149 for i in range (self .scroll_layout .count ()):
0 commit comments