From 1821faadf6fbb4f84f6f0fd0f903b73cb3c217bf Mon Sep 17 00:00:00 2001 From: dervart Date: Sun, 23 Nov 2025 19:49:03 +0700 Subject: [PATCH] styles for virtual keyboard --- portprotonqt/themes/standart/styles.py | 77 +++++++++++--------------- 1 file changed, 32 insertions(+), 45 deletions(-) diff --git a/portprotonqt/themes/standart/styles.py b/portprotonqt/themes/standart/styles.py index 39aa6dd..997bc95 100644 --- a/portprotonqt/themes/standart/styles.py +++ b/portprotonqt/themes/standart/styles.py @@ -25,6 +25,7 @@ color_e = "#404554" color_f = "#ffffff" color_g = "rgba(0, 0, 0, 0)" color_h = "transparent" +color_i = "rgba(40, 42, 51, 0.9)" GAME_CARD_ANIMATION = { # Тип анимации при входе и выходе на детальную страницу @@ -217,54 +218,40 @@ CONTEXT_MENU_STYLE = f""" }} """ -VIRTUAL_KEYBOARD_STYLE = """ -VirtualKeyboard { - background-color: rgba(30, 30, 30, 200); - border-radius: 0px; - border: none; -} -QPushButton { +VIRTUAL_KEYBOARD_STYLE = f""" +QWidget {{ + background: {color_i}; +}} +QPushButton {{ font-size: 14px; - border: 1px solid #555; - border-top-color: #666; - border-left-color: #666; - border-radius: 3px; + border: {border_a} {color_h}; + border-radius: {border_radius_a}; min-width: 30px; min-height: 30px; - padding: 4px; - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #505050, stop:1 #404040); - color: #e0e0e0; -} -QPushButton:hover { - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #606060, stop:1 #505050); - border: 1px solid #666; - border-top-color: #777; - border-left-color: #777; -} -QPushButton:focus { - border: 2px solid #4a90e2; - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #5a5a5a, stop:1 #454545); -} -QPushButton:pressed { - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #3a3a3a, stop:1 #303030); - border: 1px solid #444; - border-bottom-color: #555; - border-right-color: #555; - padding-top: 5px; - padding-bottom: 3px; - padding-left: 5px; - padding-right: 3px; -} -QPushButton[checked="true"] { - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4a90e2, stop:1 #3a7ad2); - color: white; - border: 1px solid #2a6ac2; - border-top-color: #5aa0f2; - border-left-color: #5aa0f2; -} -QPushButton[checked="true"]:focus { - border: 2px solid #6aa3f5; -} + padding: 5px; + background-color: {color_c}; + color: {color_f}; +}} +QPushButton:hover {{ + background-color: {color_a}; + border: {border_b} {color_a}; +}} +QPushButton:focus {{ + border: {border_b} {color_a}; + background-color: {color_a}; +}} +QPushButton:pressed {{ + background-color: {color_c}; + border: {border_a} {color_h}; +}} +QPushButton[checked="true"] {{ + background-color: {color_a}; + color: {color_f}; + border: {border_a} {color_h}; +}} +QPushButton[checked="true"]:focus {{ + border: {border_b} {color_f}; +}} """ # ГЛОБАЛЬНЫЙ СТИЛЬ ДЛЯ ОКНА (ФОН), ЛЭЙБЛОВ, КНОПОК