From 1f14dd7fdffe6cf5ef652c1210723a03f75aa924 Mon Sep 17 00:00:00 2001 From: dervart Date: Fri, 20 Jun 2025 19:27:59 +0700 Subject: [PATCH] native package: fix combobox full width in PORTPROTON SETTINGS thanks to @Boria138 --- portprotonqt/main_window.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/portprotonqt/main_window.py b/portprotonqt/main_window.py index 76c6a1e..6120de2 100644 --- a/portprotonqt/main_window.py +++ b/portprotonqt/main_window.py @@ -40,6 +40,7 @@ from typing import cast from collections.abc import Callable from concurrent.futures import ThreadPoolExecutor from datetime import datetime +from PySide6.QtWidgets import QSizePolicy logger = get_logger(__name__) @@ -958,7 +959,7 @@ class MainWindow(QMainWindow): # 1. Time detail_level self.timeDetailCombo = QComboBox() - self.timeDetailCombo.setMinimumContentsLength(500) # удалить потом. Сомнительное решение для растягивания комбобоксов в нативе + self.timeDetailCombo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed) self.time_keys = ["detailed", "brief"] self.time_labels = [_("detailed"), _("brief")] self.timeDetailCombo.addItems(self.time_labels) @@ -977,7 +978,7 @@ class MainWindow(QMainWindow): # 2. Games sort_method 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_labels = [_("last launch"), _("playtime"), _("alphabetical"), _("favorites")] self.gamesSortCombo.addItems(self.sort_labels) @@ -998,7 +999,7 @@ class MainWindow(QMainWindow): self.filter_keys = ["all", "steam", "portproton", "favorites", "epic"] self.filter_labels = [_("all"), "steam", "portproton", _("favorites")] self.gamesDisplayCombo = QComboBox() - self.gamesDisplayCombo.setMinimumContentsLength(500) # удалить потом. Сомнительное решение для растягивания комбобоксов в нативе + self.gamesDisplayCombo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed) self.gamesDisplayCombo.addItems(self.filter_labels) self.gamesDisplayCombo.setStyleSheet(self.theme.SETTINGS_COMBO_STYLE) self.gamesDisplayCombo.setFocusPolicy(Qt.FocusPolicy.StrongFocus)