native package: fix combobox full width in PORTPROTON SETTINGS thanks to @Boria138
All checks were successful
Code and build check / Check code (pull_request) Successful in 1m47s
Code and build check / Build with uv (pull_request) Successful in 54s

This commit is contained in:
2025-06-20 19:27:59 +07:00
parent c99bb2183d
commit 8c1c505669

View File

@ -40,6 +40,7 @@ from typing import cast
from collections.abc import Callable from collections.abc import Callable
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
from datetime import datetime from datetime import datetime
from PySide6.QtWidgets import QSizePolicy
logger = get_logger(__name__) logger = get_logger(__name__)
@ -922,7 +923,7 @@ class MainWindow(QMainWindow):
# 1. Time detail_level # 1. Time detail_level
self.timeDetailCombo = QComboBox() self.timeDetailCombo = QComboBox()
self.timeDetailCombo.setMinimumContentsLength(500) # удалить потом. Сомнительное решение для растягивания комбобоксов в нативе self.timeDetailCombo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.time_keys = ["detailed", "brief"] self.time_keys = ["detailed", "brief"]
self.time_labels = [_("detailed"), _("brief")] self.time_labels = [_("detailed"), _("brief")]
self.timeDetailCombo.addItems(self.time_labels) self.timeDetailCombo.addItems(self.time_labels)
@ -941,7 +942,7 @@ class MainWindow(QMainWindow):
# 2. Games sort_method # 2. Games sort_method
self.gamesSortCombo = QComboBox() self.gamesSortCombo = QComboBox()
self.gamesSortCombo.setMinimumContentsLength(500) # удалить потом. Сомнительное решение для растягивания комбобоксов в нативе self.gamesSortCombo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.sort_keys = ["last_launch", "playtime", "alphabetical", "favorites"] self.sort_keys = ["last_launch", "playtime", "alphabetical", "favorites"]
self.sort_labels = [_("last launch"), _("playtime"), _("alphabetical"), _("favorites")] self.sort_labels = [_("last launch"), _("playtime"), _("alphabetical"), _("favorites")]
self.gamesSortCombo.addItems(self.sort_labels) self.gamesSortCombo.addItems(self.sort_labels)
@ -962,7 +963,7 @@ class MainWindow(QMainWindow):
self.filter_keys = ["all", "steam", "portproton", "favorites", "epic"] self.filter_keys = ["all", "steam", "portproton", "favorites", "epic"]
self.filter_labels = [_("all"), "steam", "portproton", _("favorites")] self.filter_labels = [_("all"), "steam", "portproton", _("favorites")]
self.gamesDisplayCombo = QComboBox() self.gamesDisplayCombo = QComboBox()
self.gamesDisplayCombo.setMinimumContentsLength(500) # удалить потом. Сомнительное решение для растягивания комбобоксов в нативе self.gamesDisplayCombo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.gamesDisplayCombo.addItems(self.filter_labels) self.gamesDisplayCombo.addItems(self.filter_labels)
self.gamesDisplayCombo.setStyleSheet(self.theme.SETTINGS_COMBO_STYLE) self.gamesDisplayCombo.setStyleSheet(self.theme.SETTINGS_COMBO_STYLE)
self.gamesDisplayCombo.setFocusPolicy(Qt.FocusPolicy.StrongFocus) self.gamesDisplayCombo.setFocusPolicy(Qt.FocusPolicy.StrongFocus)