@@ -89,6 +89,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
8989 self .name_title = QLabel (Translations ["tag.name" ])
9090 self .name_layout .addWidget (self .name_title )
9191 self .name_field = QLineEdit ()
92+ self .name_title .setBuddy (self .name_field )
9293 self .name_field .setFixedHeight (24 )
9394 self .name_field .textChanged .connect (self .on_name_changed )
9495 self .name_field .setPlaceholderText (Translations ["tag.tag_name_required" ])
@@ -104,6 +105,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
104105 self .shorthand_title = QLabel (Translations ["tag.shorthand" ])
105106 self .shorthand_layout .addWidget (self .shorthand_title )
106107 self .shorthand_field = QLineEdit ()
108+ self .shorthand_title .setBuddy (self .shorthand_field )
107109 self .shorthand_layout .addWidget (self .shorthand_field )
108110
109111 # Aliases --------------------------------------------------------------
@@ -117,6 +119,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
117119 self .aliases_layout .addWidget (self .aliases_title )
118120
119121 self .aliases_table = QTableWidget (0 , 2 )
122+ self .aliases_title .setBuddy (self .aliases_table )
120123 self .aliases_table .horizontalHeader ().setVisible (False )
121124 self .aliases_table .verticalHeader ().setVisible (False )
122125 self .aliases_table .horizontalHeader ().setStretchLastSection (True )
@@ -125,7 +128,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
125128 self .aliases_table .setFocusPolicy (Qt .FocusPolicy .NoFocus )
126129
127130 self .aliases_add_button = QPushButton ()
128- self .aliases_add_button .setText ("+" )
131+ self .aliases_add_button .setText (Translations [ "tag.alias.new" ] )
129132 self .aliases_add_button .clicked .connect (self .add_alias_callback )
130133
131134 # Parent Tags ----------------------------------------------------------
@@ -144,6 +147,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
144147
145148 self .scroll_contents = QWidget ()
146149 self .parent_tags_scroll_layout = QVBoxLayout (self .scroll_contents )
150+ self .parent_tags_title .setBuddy (self .scroll_contents )
147151 self .parent_tags_scroll_layout .setContentsMargins (6 , 6 , 6 , 0 )
148152 self .parent_tags_scroll_layout .setAlignment (Qt .AlignmentFlag .AlignTop )
149153
@@ -157,7 +161,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
157161
158162 self .parent_tags_add_button = QPushButton ()
159163 self .parent_tags_add_button .setCursor (Qt .CursorShape .PointingHandCursor )
160- self .parent_tags_add_button .setText ("+" )
164+ self .parent_tags_add_button .setText (Translations [ "tag.parent_tags.add.button" ] )
161165 self .parent_tags_layout .addWidget (self .parent_tags_add_button )
162166
163167 exclude_ids : list [int ] = list ()
@@ -199,6 +203,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
199203 )
200204 self .color_button .button .clicked .connect (self .choose_color_modal .show )
201205 self .color_layout .addWidget (self .color_button )
206+ self .color_title .setBuddy (self .color_button )
202207
203208 # Category -------------------------------------------------------------
204209 self .cat_widget = QWidget ()
@@ -209,6 +214,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
209214 self .cat_layout .setAlignment (Qt .AlignmentFlag .AlignLeft )
210215 self .cat_title = QLabel (Translations ["tag.is_category" ])
211216 self .cat_checkbox = QCheckBox ()
217+ self .cat_title .setBuddy (self .cat_checkbox )
212218 self .cat_checkbox .setFixedSize (22 , 22 )
213219
214220 primary_color = QColor (get_tag_color (ColorType .PRIMARY , TagColorEnum .DEFAULT ))
0 commit comments