From 3e828e1e4bfec422eb482d2ad328c16a74814772 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 30 May 2023 19:58:37 -0400 Subject: [PATCH] Add a hover and pressed to the visual indication of MyButton. --- gpt4all-chat/qml/MyButton.qml | 7 +++---- gpt4all-chat/qml/Theme.qml | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gpt4all-chat/qml/MyButton.qml b/gpt4all-chat/qml/MyButton.qml index 96d4ce93..8710008a 100644 --- a/gpt4all-chat/qml/MyButton.qml +++ b/gpt4all-chat/qml/MyButton.qml @@ -14,11 +14,10 @@ Button { Accessible.name: text } background: Rectangle { - opacity: .5 - border.color: theme.backgroundLightest - border.width: 1 + border.color: myButton.down ? theme.backgroundLightest : theme.buttonBorder + border.width: 2 radius: 10 - color: theme.backgroundLight + color: myButton.hovered ? theme.backgroundLighter : theme.backgroundLight } Accessible.role: Accessible.Button Accessible.name: text diff --git a/gpt4all-chat/qml/Theme.qml b/gpt4all-chat/qml/Theme.qml index 548aeba7..c984fd51 100644 --- a/gpt4all-chat/qml/Theme.qml +++ b/gpt4all-chat/qml/Theme.qml @@ -12,6 +12,7 @@ QtObject { property color backgroundLight: "#343541" property color backgroundLighter: "#444654" property color backgroundLightest: "#7d7d8e" + property color buttonBorder: "#565869" property color dialogBorder: "#d1d5db" property color userColor: "#ec86bf" property color assistantColor: "#10a37f"