From 3a6ecce4f742baa44351570fa6c27d6fca329ba2 Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 29 Aug 2019 21:06:24 -0400 Subject: [PATCH] Improve background gradient --- src/qml/LoadingScreen.qml | 8 ++++---- src/qml/UI.qml | 6 +++--- src/themes/Default.qpl | 21 ++++++++++++--------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/qml/LoadingScreen.qml b/src/qml/LoadingScreen.qml index d6d06577..5a548591 100644 --- a/src/qml/LoadingScreen.qml +++ b/src/qml/LoadingScreen.qml @@ -5,12 +5,12 @@ Item { Rectangle { anchors.fill: parent scale: Math.max( - 1.6, Math.ceil(parent.parent.width / parent.parent.height) + 2.25, Math.ceil(parent.parent.width / parent.parent.height) ) - rotation: 45 * 3 + rotation: -45 gradient: Gradient { - GradientStop { position: 0.0; color: Qt.hsla(0.73, 0.25, 0.25, 1) } - GradientStop { position: 1.0; color: Qt.hsla(0.52, 1, 0.06, 1) } + GradientStop { position: 0.0; color: "#001b20" } + GradientStop { position: 1.0; color: "#3c2f4b" } } } diff --git a/src/qml/UI.qml b/src/qml/UI.qml index f0e66ffb..9ff7411a 100644 --- a/src/qml/UI.qml +++ b/src/qml/UI.qml @@ -48,12 +48,12 @@ Rectangle { id: mainUIGradient anchors.fill: parent scale: Math.max( - 1.6, Math.ceil(parent.parent.width / parent.parent.height) + 2.25, Math.ceil(parent.parent.width / parent.parent.height) ) rotation: theme.ui.gradientRotation gradient: Gradient { - GradientStop { position: 0.0; color: theme.ui.gradientLeft } - GradientStop { position: 1.0; color: theme.ui.gradientRight } + GradientStop { position: 0.0; color: theme.ui.gradientStart } + GradientStop { position: 1.0; color: theme.ui.gradientEnd } } } diff --git a/src/themes/Default.qpl b/src/themes/Default.qpl index 2058bf56..f4260b97 100644 --- a/src/themes/Default.qpl +++ b/src/themes/Default.qpl @@ -196,16 +196,16 @@ ui: // If not specified, the gradient will be shown instead. url image: "" - int gradientRotation: 45 * 3 - color gradientRight: - Utils.hsluv(colors.hue - 50, 100, colors.intensity * 8, colors.opacity) - color gradientLeft: - Utils.hsluv(colors.hue + 20, 31, colors.intensity * 22, colors.opacity) + int gradientRotation: -45 + color gradientStart: + hsluv(colors.hue - 50, 100, colors.intensity * 8, 1.0) + color gradientEnd: + hsluv(colors.hue + 20, 30, colors.intensity * 22, 1.0) // To have a solid color instead, - // set gradientLeft and gradientRight to the same value. - // color gradientLeft: colors.weakBackground - // color gradientRight: colors.weakBackground + // set gradientStart and gradientEnd to the same value. Example: + // color gradientStart: hsluv(0, 0, 0, 0.8) + // color gradientEnd: hsluv(0, 0, 0, 0.8) @@ -269,7 +269,10 @@ chat: int radius: theme.radius color background: colors.strongBackground color ownBackground: hsluv( - colors.hue, colors.saturation + 25, colors.intensity * 6, opacity + colors.hue, + colors.saturation + 25, + colors.intensity * 6, + colors.opacity + 0.2 ) color body: colors.text