From c01d71f15dfe439a7907cc5b3d9442327b2a018c Mon Sep 17 00:00:00 2001 From: dervart Date: Tue, 17 Jun 2025 20:21:41 +0700 Subject: [PATCH 1/5] native package: left alignment for portproton & addgame QLabels --- portprotonqt/dialogs.py | 1 + portprotonqt/main_window.py | 1 + 2 files changed, 2 insertions(+) diff --git a/portprotonqt/dialogs.py b/portprotonqt/dialogs.py index 00ccbf4..ae1f361 100644 --- a/portprotonqt/dialogs.py +++ b/portprotonqt/dialogs.py @@ -95,6 +95,7 @@ class AddGameDialog(QDialog): self.setStyleSheet(self.theme.MAIN_WINDOW_STYLE + self.theme.MESSAGE_BOX_STYLE) layout = QFormLayout(self) + layout.setLabelAlignment(Qt.AlignmentFlag.AlignLeft) # Game name self.nameEdit = QLineEdit(self) diff --git a/portprotonqt/main_window.py b/portprotonqt/main_window.py index 6b6ed82..aa32232 100644 --- a/portprotonqt/main_window.py +++ b/portprotonqt/main_window.py @@ -918,6 +918,7 @@ class MainWindow(QMainWindow): formLayout = QFormLayout() formLayout.setContentsMargins(0, 10, 0, 0) formLayout.setSpacing(10) + formLayout.setLabelAlignment(Qt.AlignmentFlag.AlignLeft) # 1. Time detail_level self.timeDetailCombo = QComboBox() -- 2.49.0 From 1bf5b84f1d34c396a33b90c973754dc3031c9485 Mon Sep 17 00:00:00 2001 From: dervart Date: Tue, 17 Jun 2025 20:27:45 +0700 Subject: [PATCH 2/5] native package: combobox full width in PORTPROTON SETTINGS --- portprotonqt/main_window.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/portprotonqt/main_window.py b/portprotonqt/main_window.py index aa32232..262ff8b 100644 --- a/portprotonqt/main_window.py +++ b/portprotonqt/main_window.py @@ -922,6 +922,7 @@ class MainWindow(QMainWindow): # 1. Time detail_level self.timeDetailCombo = QComboBox() + self.timeDetailCombo.setMinimumContentsLength(500) # удалить потом. Сомнительное решение для растягивания комбобоксов в нативе self.time_keys = ["detailed", "brief"] self.time_labels = [_("detailed"), _("brief")] self.timeDetailCombo.addItems(self.time_labels) @@ -940,6 +941,7 @@ class MainWindow(QMainWindow): # 2. Games sort_method self.gamesSortCombo = QComboBox() + self.gamesSortCombo.setMinimumContentsLength(500) # удалить потом. Сомнительное решение для растягивания комбобоксов в нативе self.sort_keys = ["last_launch", "playtime", "alphabetical", "favorites"] self.sort_labels = [_("last launch"), _("playtime"), _("alphabetical"), _("favorites")] self.gamesSortCombo.addItems(self.sort_labels) @@ -960,6 +962,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.addItems(self.filter_labels) self.gamesDisplayCombo.setStyleSheet(self.theme.SETTINGS_COMBO_STYLE) self.gamesDisplayCombo.setFocusPolicy(Qt.FocusPolicy.StrongFocus) -- 2.49.0 From c99bb2183d6a94cb20f8b6a94908f88a496fd0e8 Mon Sep 17 00:00:00 2001 From: dervart Date: Tue, 17 Jun 2025 20:34:02 +0700 Subject: [PATCH 3/5] dark_theme remove duplicate SETTINGS_CHECKBOX_STYLE --- portprotonqt/themes/standart/styles.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/portprotonqt/themes/standart/styles.py b/portprotonqt/themes/standart/styles.py index 77c1629..af4bce6 100644 --- a/portprotonqt/themes/standart/styles.py +++ b/portprotonqt/themes/standart/styles.py @@ -190,13 +190,6 @@ SEARCH_EDIT_STYLE = """ } """ -SETTINGS_CHECKBOX_STYLE = """ - QCheckBox:focus { - border: 2px solid #409EFF; - background: #404554; - } -""" - # ОТКЛЮЧАЕМ РАМКУ У QScrollArea SCROLL_AREA_STYLE = """ QWidget { -- 2.49.0 From 8c1c505669e5e0469143279739404a309a6346fb Mon Sep 17 00:00:00 2001 From: dervart Date: Fri, 20 Jun 2025 19:27:59 +0700 Subject: [PATCH 4/5] 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 262ff8b..0dadf6b 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__) @@ -922,7 +923,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) @@ -941,7 +942,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) @@ -962,7 +963,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) -- 2.49.0 From 5361a8abc4a759dec86fe1cce3f90e3fa6750c21 Mon Sep 17 00:00:00 2001 From: dervart Date: Sat, 21 Jun 2025 17:03:33 +0700 Subject: [PATCH 5/5] native package: fix combobox list --- portprotonqt/themes/standart/styles.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/portprotonqt/themes/standart/styles.py b/portprotonqt/themes/standart/styles.py index af4bce6..0c01cba 100644 --- a/portprotonqt/themes/standart/styles.py +++ b/portprotonqt/themes/standart/styles.py @@ -696,7 +696,8 @@ SETTINGS_COMBO_STYLE = f""" }} QComboBox:on {{ background: #373a43; - border: 1px solid #409EFF; + border: 2px solid #409EFF; + border-bottom-style: none; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-left-radius: 0px; @@ -734,15 +735,20 @@ SETTINGS_COMBO_STYLE = f""" /* Список при открытом комбобоксе */ QComboBox QAbstractItemView {{ outline: none; - border: 1px solid #409EFF; + border: 2px solid #409EFF; border-top-style: none; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; }} QListView {{ background: #3f424d; }} QListView::item {{ padding: 7px 7px 7px 12px; - border-radius: 0px; + margin: 0px 3px 3px 3px; + border-radius: 10px; color: #ffffff; }} QListView::item:hover {{ -- 2.49.0