Compare commits

...

3 Commits

Author SHA1 Message Date
1c1110a6e7 feat(dialogs): change buttons accept/reject to AutoSizeButton
Some checks failed
Code and build check / Check code (pull_request) Failing after 1m38s
Code and build check / Build with uv (pull_request) Successful in 56s
2025-06-28 04:54:58 +00:00
797e203156 Revert "feat(renovate): use config from Linux-Gaming repo"
All checks were successful
Code and build check / Check code (push) Successful in 4m29s
Code and build check / Build with uv (push) Successful in 56s
This reverts commit c862a39225.
2025-06-28 09:49:53 +05:00
c862a39225 feat(renovate): use config from Linux-Gaming repo
All checks were successful
Code and build check / Check code (push) Successful in 1m40s
Code and build check / Build with uv (push) Successful in 54s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-06-28 09:42:22 +05:00

View File

@ -359,6 +359,7 @@ class AddGameDialog(QDialog):
def __init__(self, parent=None, theme=None, edit_mode=False, game_name=None, exe_path=None, cover_path=None):
super().__init__(parent)
self.theme = theme if theme else default_styles
self.theme_manager = ThemeManager()
self.edit_mode = edit_mode
self.original_name = game_name
@ -418,13 +419,18 @@ class AddGameDialog(QDialog):
layout.addRow(preview_label, self.coverPreview)
# Dialog buttons
buttonBox = QDialogButtonBox(
QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Cancel
)
buttonBox.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
layout.addRow(buttonBox)
self.button_layout = QHBoxLayout()
self.button_layout.setSpacing(10)
self.select_button = AutoSizeButton(_("Select"), icon=self.theme_manager.get_icon("apply"))
self.cancel_button = AutoSizeButton(_("Cancel"), icon=self.theme_manager.get_icon("cancel"))
self.select_button.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
self.cancel_button.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
self.button_layout.addWidget(self.select_button)
self.button_layout.addWidget(self.cancel_button)
layout.addRow(self.button_layout)
self.select_button.clicked.connect(self.accept)
self.cancel_button.clicked.connect(self.reject)
self.coverEdit.textChanged.connect(self.updatePreview)
self.exeEdit.textChanged.connect(self.updatePreview)