Skip to content

Commit b3b37ac

Browse files
authored
Update settings.py
1 parent 72e3882 commit b3b37ac

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

settings.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from PySide6.QtWidgets import QMainWindow, QLabel, QPushButton, QGridLayout, QVBoxLayout, QWidget, QHBoxLayout, QComboBox, QCheckBox, QLineEdit, QScrollArea, QMessageBox
55
from PySide6.QtGui import QFont
66
from 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

99
is_dark_mode = True
1010
is_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

Comments
 (0)