From f605403037bc340886027857dcef465e8384516b Mon Sep 17 00:00:00 2001 From: reionwong Date: Wed, 21 Jul 2021 14:47:04 +0800 Subject: [PATCH] Improve button color on solid color background --- qml/StandardButton.qml | 4 ++-- qml/Zone.qml | 2 +- qml/main.qml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qml/StandardButton.qml b/qml/StandardButton.qml index 0abd01d..bc5a788 100644 --- a/qml/StandardButton.qml +++ b/qml/StandardButton.qml @@ -17,9 +17,9 @@ Item { Layout.fillHeight: true property color backgroundColor: FishUI.Theme.backgroundColor - property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.1) + property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.7) : Qt.darker(FishUI.Theme.backgroundColor, 1.1) - property color pressedColor: FishUI.Theme.darkMode ? Qt.darker(FishUI.Theme.backgroundColor, 1.05) + property color pressedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.4) : Qt.darker(FishUI.Theme.backgroundColor, 1.3) property color flatBg: FishUI.Theme.highlightColor diff --git a/qml/Zone.qml b/qml/Zone.qml index 05e4b86..3cb0311 100644 --- a/qml/Zone.qml +++ b/qml/Zone.qml @@ -37,7 +37,7 @@ Item { id: label anchors.fill: parent horizontalAlignment: Qt.AlignRight - text: historyModel.get(index).text + text: historyModel.count > 0 ? historyModel.get(index).text : "" elide: Text.ElideMiddle color: FishUI.Theme.disabledTextColor diff --git a/qml/main.qml b/qml/main.qml index 31f10b7..bd9c343 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -48,7 +48,7 @@ FishUI.Window { Rectangle { z: -1 anchors.fill: parent - color: rootWindow.background.color + color: FishUI.Theme.secondBackgroundColor opacity: 0.4 }