@@ -63,32 +63,38 @@ def init_ui(self):
6363 QLineEdit, QSpinBox {{
6464 background-color: { COLORS ['surface' ]} ;
6565 border: 1px solid { COLORS ['border' ]} ;
66- border-radius: 4px ;
67- padding: 8px;
68- font-size: 14px ;
66+ border-radius: 8px ;
67+ padding: 8px 10px ;
68+ font-size: 13px ;
6969 color: { COLORS ['text' ]} ;
70- min-height: 20px;
71- min-width: 100px;
70+ height: 28px;
71+ margin: 2px;
72+ }}
73+ QSpinBox::up-button, QSpinBox::down-button {{
74+ width: 0px;
75+ height: 0px;
7276 }}
7377 QLineEdit:focus, QSpinBox:focus {{
7478 border: 1px solid { COLORS ['accent' ]} ;
7579 }}
7680 QTableWidget {{
7781 background-color: { COLORS ['surface' ]} ;
7882 border: 1px solid { COLORS ['border' ]} ;
79- border-radius: 8px;
8083 gridline-color: { COLORS ['border' ]} ;
8184 color: { COLORS ['text' ]} ;
85+ font-size: 13px;
8286 }}
8387 QTableWidget::item {{
84- padding: 4px;
88+ padding: 0px;
89+ margin: 0px;
8590 }}
8691 QHeaderView::section {{
8792 background-color: { COLORS ['overlay' ]} ;
8893 color: { COLORS ['text' ]} ;
89- padding: 6px ;
94+ padding: 10px ;
9095 border: none;
9196 font-weight: bold;
97+ font-size: 13px;
9298 }}
9399 """ )
94100
@@ -207,6 +213,20 @@ def create_editor_panel(self) -> QWidget:
207213 name_label .setFixedWidth (100 )
208214 self .game_name_input = QLineEdit ()
209215 self .game_name_input .setPlaceholderText ("Введіть назву гри..." )
216+ self .game_name_input .setStyleSheet (f"""
217+ QLineEdit {{
218+ background-color: { COLORS ['surface' ]} ;
219+ border: 1px solid { COLORS ['border' ]} ;
220+ border-radius: 12px;
221+ padding: 10px;
222+ font-size: 14px;
223+ color: { COLORS ['text' ]} ;
224+ min-height: 32px;
225+ }}
226+ QLineEdit:focus {{
227+ border: 1px solid { COLORS ['accent' ]} ;
228+ }}
229+ """ )
210230 name_layout .addWidget (name_label )
211231 name_layout .addWidget (self .game_name_input )
212232 info_layout .addLayout (name_layout )
@@ -263,6 +283,8 @@ def create_editor_panel(self) -> QWidget:
263283
264284 self .sections_table .verticalHeader ().setVisible (False )
265285 self .sections_table .verticalHeader ().setSectionResizeMode (QHeaderView .ResizeMode .ResizeToContents )
286+
287+ self .sections_table .setShowGrid (False )
266288 layout .addWidget (self .sections_table )
267289
268290 # Add section button
@@ -378,42 +400,36 @@ def add_section_to_table(self, section: dict = None):
378400 name_input = QLineEdit ()
379401 name_input .setText (section .get ('name' , '' ) if section else '' )
380402 name_input .setPlaceholderText ("Назва секції" )
381- name_input .setMinimumWidth (200 )
382403 self .sections_table .setCellWidget (row , 0 , name_input )
383404
384405 # Total
385406 total_spin = QSpinBox ()
386407 total_spin .setMaximum (999999999 )
387408 total_spin .setValue (section .get ('total' , 0 ) if section else 0 )
388- total_spin .setMinimumWidth (100 )
389409 self .sections_table .setCellWidget (row , 1 , total_spin )
390410
391411 # Translated
392412 translated_spin = QSpinBox ()
393413 translated_spin .setMaximum (999999999 )
394414 translated_spin .setValue (section .get ('translated' , 0 ) if section else 0 )
395- translated_spin .setMinimumWidth (100 )
396415 self .sections_table .setCellWidget (row , 2 , translated_spin )
397416
398417 # Translated Label (custom)
399418 trans_label_input = QLineEdit ()
400419 trans_label_input .setText (section .get ('translated_label' , '' ) if section else '' )
401420 trans_label_input .setPlaceholderText ("Перекладено" )
402- trans_label_input .setMinimumWidth (120 )
403421 self .sections_table .setCellWidget (row , 3 , trans_label_input )
404422
405423 # Approved
406424 approved_spin = QSpinBox ()
407425 approved_spin .setMaximum (999999999 )
408426 approved_spin .setValue (section .get ('approved' , 0 ) if section else 0 )
409- approved_spin .setMinimumWidth (100 )
410427 self .sections_table .setCellWidget (row , 4 , approved_spin )
411428
412429 # Approved Label (custom)
413430 appr_label_input = QLineEdit ()
414431 appr_label_input .setText (section .get ('approved_label' , '' ) if section else '' )
415432 appr_label_input .setPlaceholderText ("Затверджено" )
416- appr_label_input .setMinimumWidth (120 )
417433 self .sections_table .setCellWidget (row , 5 , appr_label_input )
418434
419435 # Exclude checkbox
@@ -428,20 +444,29 @@ def add_section_to_table(self, section: dict = None):
428444
429445 # Delete button
430446 delete_btn = QPushButton ("🗑️" )
431- delete_btn .setFixedSize (30 , 30 )
447+ delete_btn .setMaximumWidth (24 )
448+ delete_btn .setMaximumHeight (24 )
432449 delete_btn .clicked .connect (lambda : self .delete_section (row ))
433450 delete_btn .setStyleSheet (f"""
434451 QPushButton {{
435452 background-color: { COLORS ['error' ]} ;
436453 border: none;
437- border-radius: 4px ;
454+ border-radius: 3px ;
438455 color: white;
456+ padding: 0px;
457+ margin: 0px;
458+ font-size: 12px;
439459 }}
440460 QPushButton:hover {{
441461 background-color: #e74c6c;
442462 }}
443463 """ )
444- self .sections_table .setCellWidget (row , 7 , delete_btn )
464+ delete_widget = QWidget ()
465+ delete_layout = QHBoxLayout (delete_widget )
466+ delete_layout .addWidget (delete_btn )
467+ delete_layout .setAlignment (Qt .AlignmentFlag .AlignCenter )
468+ delete_layout .setContentsMargins (0 , 0 , 0 , 0 )
469+ self .sections_table .setCellWidget (row , 7 , delete_widget )
445470
446471 def add_section (self ):
447472 """Add new empty section"""
0 commit comments