From 92f795f0e58512cf01f79b74ab4d93ebd0ceaf3e Mon Sep 17 00:00:00 2001 From: dervart Date: Tue, 9 Jun 2026 20:36:45 +0700 Subject: [PATCH] fix: combobox styles for filters --- portprotonqt/themes/classic-light/styles.py | 26 +++++++++----- portprotonqt/themes/classic/styles.py | 34 ++++++++++++------- portprotonqt/themes/standart-light/styles.py | 27 ++++++++++----- portprotonqt/themes/standart/styles/base.py | 5 ++- .../themes/standart/styles/detail_page.py | 28 ++++++++++----- 5 files changed, 79 insertions(+), 41 deletions(-) diff --git a/portprotonqt/themes/classic-light/styles.py b/portprotonqt/themes/classic-light/styles.py index d74aa53c..51bbd852 100644 --- a/portprotonqt/themes/classic-light/styles.py +++ b/portprotonqt/themes/classic-light/styles.py @@ -314,10 +314,18 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" combobox-popup: 0; }} QComboBox:hover, - QComboBox:focus, + QComboBox:focus{{ + background: {color_b}; + border: {border_b} {color_a}; + }} QComboBox:on {{ background: {color_b}; border: {border_b} {color_a}; + border-bottom-style: none; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; }} QComboBox::drop-down {{ subcontrol-origin: padding; @@ -343,16 +351,18 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" outline: none; background: {color_c}; border: {border_b} {color_a}; - border-radius: {border_radius_a}; - color: {color_l}; - selection-background-color: {color_a}; - selection-color: {color_l}; + border-top-style: none; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; }} QComboBox QAbstractItemView::item {{ - background: {color_c}; - color: {color_l}; - padding: 6px 10px; + padding: 3px 3px 3px 6px; + margin: 1px; min-height: 24px; + border-radius: {border_radius_a}; + color: {color_l}; }} QComboBox QAbstractItemView::item:hover, QComboBox QAbstractItemView::item:selected {{ diff --git a/portprotonqt/themes/classic/styles.py b/portprotonqt/themes/classic/styles.py index 4e617338..5da5b800 100644 --- a/portprotonqt/themes/classic/styles.py +++ b/portprotonqt/themes/classic/styles.py @@ -232,8 +232,8 @@ LIBRARY_CONTROLS_BUTTON_STYLE = f""" LIBRARY_FILTER_COMBOBOX_STYLE = f""" QComboBox {{ - background: {color_b}; - border: {border_a}; + background: {color_d}; + border: {border_b} {color_h}; border-radius: {border_radius_a}; padding-left: 12px; height: 30px; @@ -244,11 +244,19 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" combobox-popup: 0; }} QComboBox:hover, - QComboBox:focus, - QComboBox:on {{ - background: {color_b}; + QComboBox:focus {{ + background: {color_a}; border: {border_b} {color_a}; }} + QComboBox:on {{ + background: {color_d}; + border: {border_b} {color_a}; + border-bottom-style: none; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + }} QComboBox::drop-down {{ subcontrol-origin: padding; subcontrol-position: center right; @@ -273,16 +281,18 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" outline: none; background: {color_c}; border: {border_b} {color_a}; - border-radius: {border_radius_a}; - color: {color_f}; - selection-background-color: {color_a}; - selection-color: {color_f}; + border-top-style: none; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; }} QComboBox QAbstractItemView::item {{ - background: {color_c}; - color: {color_f}; - padding: 6px 10px; + padding: 3px 3px 3px 6px; + margin: 1px; min-height: 24px; + border-radius: {border_radius_a}; + color: {color_f}; }} QComboBox QAbstractItemView::item:hover, QComboBox QAbstractItemView::item:selected {{ diff --git a/portprotonqt/themes/standart-light/styles.py b/portprotonqt/themes/standart-light/styles.py index 99dd4d0a..1a9d915b 100644 --- a/portprotonqt/themes/standart-light/styles.py +++ b/portprotonqt/themes/standart-light/styles.py @@ -831,10 +831,18 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" combobox-popup: 0; }} QComboBox:hover, - QComboBox:focus, + QComboBox:focus {{ + background: {color_b}; + border: {border_b} {color_a}; + }} QComboBox:on {{ background: {color_b}; border: {border_b} {color_a}; + border-bottom-style: none; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; }} QComboBox::drop-down {{ subcontrol-origin: padding; @@ -860,16 +868,18 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" outline: none; background: {color_c}; border: {border_b} {color_a}; - border-radius: {border_radius_a}; - color: {color_l}; - selection-background-color: {color_a}; - selection-color: {color_l}; + border-top-style: none; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; }} QComboBox QAbstractItemView::item {{ - background: {color_c}; - color: {color_l}; - padding: 6px 10px; + padding: 7px 7px 7px 12px; + margin: 3px; min-height: 24px; + border-radius: {border_radius_a}; + color: {color_l}; }} QComboBox QAbstractItemView::item:hover, QComboBox QAbstractItemView::item:selected {{ @@ -1582,7 +1592,6 @@ TOOLTIP_STYLE = f""" QLabel {{ background-color: {color_b}; border: {border_b} {color_c}; - border-radius: {border_radius_a}; padding: 8px; color: {color_l}; font-family: '{font_family}'; diff --git a/portprotonqt/themes/standart/styles/base.py b/portprotonqt/themes/standart/styles/base.py index f6aef8b9..a5f371d5 100644 --- a/portprotonqt/themes/standart/styles/base.py +++ b/portprotonqt/themes/standart/styles/base.py @@ -675,9 +675,8 @@ LINE_EDIT_STYLE = f""" TOOLTIP_STYLE = f""" QLabel {{ - background-color: {color_b}; - border: {border_b} {color_c}; - border-radius: {border_radius_a}; + background: {color_b}; + border: {border_b} {color_e}; padding: 8px; color: {color_f}; font-family: '{font_family}'; diff --git a/portprotonqt/themes/standart/styles/detail_page.py b/portprotonqt/themes/standart/styles/detail_page.py index 6e469a1d..2e7614e7 100644 --- a/portprotonqt/themes/standart/styles/detail_page.py +++ b/portprotonqt/themes/standart/styles/detail_page.py @@ -60,11 +60,19 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" combobox-popup: 0; }} QComboBox:hover, - QComboBox:focus, - QComboBox:on {{ + QComboBox:focus {{ background: rgba(20, 20, 20, 0.40); border: {border_b} {color_a}; }} + QComboBox:on {{ + background: {color_b}; + border: {border_b} {color_a}; + border-bottom-style: none; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + }} QComboBox::drop-down {{ subcontrol-origin: padding; subcontrol-position: center right; @@ -89,16 +97,18 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f""" outline: none; background: {color_c}; border: {border_b} {color_a}; - border-radius: {border_radius_a}; - color: {color_f}; - selection-background-color: {color_a}; - selection-color: {color_f}; + border-top-style: none; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; }} QComboBox QAbstractItemView::item {{ - background: {color_c}; - color: {color_f}; - padding: 6px 10px; + padding: 7px 7px 7px 12px; + margin: 3px; min-height: 24px; + border-radius: {border_radius_a}; + color: {color_f}; }} QComboBox QAbstractItemView::item:hover, QComboBox QAbstractItemView::item:selected {{ -- 2.54.0