fix
This commit is contained in:
parent
e24247bdb2
commit
f6033e3a9f
@ -2,7 +2,7 @@ from PySide6.QtWidgets import (
|
|||||||
QWidget, QLabel, QLineEdit, QPushButton, QVBoxLayout, QMessageBox,
|
QWidget, QLabel, QLineEdit, QPushButton, QVBoxLayout, QMessageBox,
|
||||||
QHBoxLayout, QSpacerItem, QSizePolicy, QComboBox
|
QHBoxLayout, QSpacerItem, QSizePolicy, QComboBox
|
||||||
)
|
)
|
||||||
from PySide6.QtCore import Qt
|
from PySide6.QtCore import Qt, QTimer
|
||||||
from ..widgets.validation_input import ValidationInput
|
from ..widgets.validation_input import ValidationInput
|
||||||
from common_lib.utils.validators import (
|
from common_lib.utils.validators import (
|
||||||
validate_username as common_validate_username,
|
validate_username as common_validate_username,
|
||||||
@ -167,15 +167,19 @@ class LoginView(QWidget):
|
|||||||
self.reg_password_input.textChanged.connect(self.confirm_password_input.on_text_changed)
|
self.reg_password_input.textChanged.connect(self.confirm_password_input.on_text_changed)
|
||||||
|
|
||||||
def _update_window_title(self):
|
def _update_window_title(self):
|
||||||
window = self.window()
|
def set_title():
|
||||||
if not window:
|
window = self.window()
|
||||||
return
|
if not window:
|
||||||
|
return
|
||||||
|
|
||||||
if self.is_registration:
|
if self.is_registration:
|
||||||
title = f"{localizer.translate('Регистрация')} | {config.APP_HEADER}"
|
title = f"{localizer.translate('Регистрация')} | {config.APP_HEADER}"
|
||||||
else:
|
else:
|
||||||
title = f"{localizer.translate('Авторизация')} | {config.APP_HEADER}"
|
title = f"{localizer.translate('Авторизация')} | {config.APP_HEADER}"
|
||||||
window.setWindowTitle(title)
|
window.setWindowTitle(title)
|
||||||
|
|
||||||
|
# Откладываем выполнение, чтобы `self.window()` уже был готов
|
||||||
|
QTimer.singleShot(0, set_title)
|
||||||
|
|
||||||
def render_form(self):
|
def render_form(self):
|
||||||
self.clear_form()
|
self.clear_form()
|
||||||
|
|||||||
Reference in New Issue
Block a user