44from PySide6 .QtWidgets import QMainWindow , QLabel , QPushButton , QGridLayout , QVBoxLayout , QWidget , QHBoxLayout , QComboBox , QCheckBox , QLineEdit , QScrollArea , QMessageBox
55from PySide6 .QtGui import QFont
66from PySide6 .QtCore import Qt , QPropertyAnimation , QRect , QEasingCurve , QTimer
7- from utils import get_text , set_gaming_tool , set_language , logging , lang # Import lang from utils
7+ from utils import get_text , set_gaming_tool , set_language , logging , lang
88
99is_dark_mode = True
1010is_muted = False
@@ -90,7 +90,7 @@ def __init__(self, parent=None):
9090 self .bottom_layout = QHBoxLayout ()
9191 self .bottom_layout .setAlignment (Qt .AlignRight )
9292 self .bottom_layout .setSpacing (40 )
93- self .bottom_layout .addStretch () # Push buttons to the right
93+ self .bottom_layout .addStretch ()
9494 self .back_btn = QPushButton (get_text ('back' ))
9595 self .back_btn .setObjectName ('action-btn' )
9696 self .back_btn .setFixedSize (300 , 100 )
@@ -105,14 +105,13 @@ def __init__(self, parent=None):
105105 self .close_btn .clicked .connect (self .close )
106106 self .bottom_layout .addWidget (self .close_btn )
107107 self .layout .addLayout (self .bottom_layout )
108- self .layout .addStretch () # Push bottom_layout to the bottom
108+ self .layout .addStretch ()
109109 self .update_texts ()
110110 QTimer .singleShot (100 , self .animate_panels )
111111 QTimer .singleShot (500 , self .log_button_visibility )
112112 logging .info ('SettingsWindow initialized successfully' )
113113
114114 def log_button_visibility (self ):
115- """Log the visibility and geometry of the Back button for debugging."""
116115 logging .info (f'Back button visible: { self .back_btn .isVisible ()} , geometry: { self .back_btn .geometry ().getRect ()} ' )
117116
118117 def back_to_main (self ):
@@ -246,7 +245,7 @@ def add_general_panel(self):
246245 self .lang_select .setObjectName ('input-field' )
247246 self .lang_select .setFixedHeight (60 )
248247 self .lang_select .addItems (['en' , 'pl' ])
249- self .lang_select .setCurrentText (lang ) # lang imported from utils
248+ self .lang_select .setCurrentText (lang )
250249 layout .addWidget (self .lang_select )
251250 apply_lang = QPushButton ('Apply Language' )
252251 apply_lang .setObjectName ('setting-btn' )
@@ -497,4 +496,3 @@ def closeEvent(self, event):
497496 super ().closeEvent (event )
498497 except Exception as e :
499498 logging .error (f'Error during close event: { e } ' )
500-
0 commit comments