@@ -386,6 +386,16 @@ def __build_row_item_widget(self, tag: Tag, parent_id: int, is_disambiguation: b
386
386
else :
387
387
text_color = get_text_color (primary_color , highlight_color )
388
388
389
+ # Add Tag Widget
390
+ tag_widget = TagWidget (
391
+ tag ,
392
+ library = self .lib ,
393
+ has_edit = False ,
394
+ has_remove = True ,
395
+ )
396
+ tag_widget .on_remove .connect (lambda t = parent_id : self .remove_parent_tag_callback (t ))
397
+ row .addWidget (tag_widget )
398
+
389
399
# Add Disambiguation Tag Button
390
400
disam_button = QRadioButton ()
391
401
disam_button .setObjectName (f"disambiguationButton.{ parent_id } " )
@@ -412,6 +422,15 @@ def __build_row_item_widget(self, tag: Tag, parent_id: int, is_disambiguation: b
412
422
f"QRadioButton::hover{{"
413
423
f"border-color: rgba{ highlight_color .toTuple ()} ;"
414
424
f"}}"
425
+ f"QRadioButton::pressed{{"
426
+ f"background: rgba{ border_color .toTuple ()} ;"
427
+ f"color: rgba{ primary_color .toTuple ()} ;"
428
+ f"border-color: rgba{ primary_color .toTuple ()} ;"
429
+ f"}}"
430
+ f"QRadioButton::focus{{"
431
+ f"border-color: rgba{ highlight_color .toTuple ()} ;"
432
+ f"outline:none;"
433
+ f"}}"
415
434
)
416
435
417
436
self .disam_button_group .addButton (disam_button )
@@ -421,18 +440,7 @@ def __build_row_item_widget(self, tag: Tag, parent_id: int, is_disambiguation: b
421
440
disam_button .clicked .connect (lambda checked = False : self .toggle_disam_id (parent_id ))
422
441
row .addWidget (disam_button )
423
442
424
- # Add Tag Widget
425
- tag_widget = TagWidget (
426
- tag ,
427
- library = self .lib ,
428
- has_edit = False ,
429
- has_remove = True ,
430
- )
431
-
432
- tag_widget .on_remove .connect (lambda t = parent_id : self .remove_parent_tag_callback (t ))
433
- row .addWidget (tag_widget )
434
-
435
- return disam_button , tag_widget .bg_button , container
443
+ return tag_widget .bg_button , disam_button , container
436
444
437
445
def toggle_disam_id (self , disambiguation_id : int | None ):
438
446
if self .disambiguation_id == disambiguation_id :
0 commit comments