dialogs.py add input styles
Some checks failed
Code and build check / Check code (pull_request) Failing after 1m9s
Code and build check / Build with uv (pull_request) Successful in 46s

This commit is contained in:
2025-06-13 11:44:20 +07:00
parent a1bdff73fe
commit bad91fed4e
2 changed files with 37 additions and 3 deletions

View File

@ -98,7 +98,7 @@ class AddGameDialog(QDialog):
# Game name
self.nameEdit = QLineEdit(self)
self.nameEdit.setStyleSheet(self.theme.SEARCH_EDIT_STYLE + " QLineEdit { color: #ffffff; font-size: 14px; }")
self.nameEdit.setStyleSheet(self.theme.ADDGAME_INPUT_STYLE)
if game_name:
self.nameEdit.setText(game_name)
name_label = QLabel(_("Game Name:"))
@ -107,7 +107,7 @@ class AddGameDialog(QDialog):
# Exe path
self.exeEdit = QLineEdit(self)
self.exeEdit.setStyleSheet(self.theme.SEARCH_EDIT_STYLE + " QLineEdit { color: #ffffff; font-size: 14px; }")
self.exeEdit.setStyleSheet(self.theme.ADDGAME_INPUT_STYLE)
if exe_path:
self.exeEdit.setText(exe_path)
exeBrowseButton = QPushButton(_("Browse..."), self)
@ -123,7 +123,7 @@ class AddGameDialog(QDialog):
# Cover path
self.coverEdit = QLineEdit(self)
self.coverEdit.setStyleSheet(self.theme.SEARCH_EDIT_STYLE + " QLineEdit { color: #ffffff; font-size: 14px; }")
self.coverEdit.setStyleSheet(self.theme.ADDGAME_INPUT_STYLE)
if cover_path:
self.coverEdit.setText(cover_path)
coverBrowseButton = QPushButton(_("Browse..."), self)

View File

@ -419,6 +419,40 @@ DIALOG_BROWSE_BUTTON_STYLE = """
}
"""
ADDGAME_INPUT_STYLE = """
QLineEdit {
background: #3f424d;
border: 2px solid rgba(255, 255, 255, 0.01);
border-radius: 10px;
height: 34px;
padding-left: 12px;
color: #ffffff;
font-family: 'Play';
font-size: 16px;
}
QLineEdit:hover {
background: #3f424d;
border: 2px solid #409EFF;
}
QLineEdit:focus {
border: 2px solid #409EFF;
background-color: #404554;
}
QMenu {
border: 1px solid rgba(255, 255, 255, 0.2);
padding: 5px 10px;
background: #32343d;
}
QMenu::item {
padding: 0px 10px;
border: 10px solid transparent; /* reserve space for selection border */
}
QMenu::item:selected {
background: #3f424d;
border-radius: 10px;
}
"""
# СТИЛЬ КАРТОЧКИ ИГРЫ (GAMECARD)
GAME_CARD_WINDOW_STYLE = """
QFrame {