mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-23 16:39:02 +00:00
Override some Material 3 colors to improve contrast
This commit is contained in:
@@ -2,6 +2,7 @@ import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
import SdlGamepadKeyNavigation 1.0
|
||||
import SystemProperties 1.0
|
||||
|
||||
// https://stackoverflow.com/questions/45029968/how-do-i-set-the-combobox-width-to-fit-the-largest-item
|
||||
ComboBox {
|
||||
@@ -38,6 +39,12 @@ ComboBox {
|
||||
popup.onAboutToShow: {
|
||||
// Switch to normal navigation for combo boxes
|
||||
SdlGamepadKeyNavigation.setUiNavMode(false)
|
||||
|
||||
// Override the popup color to improve contrast with the overridden
|
||||
// Material 2 background color set in main.qml.
|
||||
if (SystemProperties.usesMaterial3Theme) {
|
||||
popup.background.color = "#424242"
|
||||
}
|
||||
}
|
||||
|
||||
popup.onAboutToHide: {
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Controls.Material 2.2
|
||||
|
||||
import ComputerManager 1.0
|
||||
import AutoUpdateChecker 1.0
|
||||
@@ -22,6 +23,15 @@ ApplicationWindow {
|
||||
width: 1280
|
||||
height: 600
|
||||
|
||||
// Override the background color to Material 2 colors for Qt 6.5+
|
||||
// in order to improve contrast between GFE's placeholder box art
|
||||
// and the background of the app grid.
|
||||
Component.onCompleted: {
|
||||
if (SystemProperties.usesMaterial3Theme) {
|
||||
Material.background = "#303030"
|
||||
}
|
||||
}
|
||||
|
||||
visibility: {
|
||||
if (SystemProperties.hasDesktopEnvironment) {
|
||||
if (StreamingPreferences.uiDisplayMode == StreamingPreferences.UI_WINDOWED) return "Windowed"
|
||||
|
||||
Reference in New Issue
Block a user