Improve background gradient

This commit is contained in:
miruka 2019-08-29 21:06:24 -04:00
parent 552a4b53fb
commit 3a6ecce4f7
3 changed files with 19 additions and 16 deletions

View File

@ -5,12 +5,12 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
scale: Math.max( 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 { gradient: Gradient {
GradientStop { position: 0.0; color: Qt.hsla(0.73, 0.25, 0.25, 1) } GradientStop { position: 0.0; color: "#001b20" }
GradientStop { position: 1.0; color: Qt.hsla(0.52, 1, 0.06, 1) } GradientStop { position: 1.0; color: "#3c2f4b" }
} }
} }

View File

@ -48,12 +48,12 @@ Rectangle {
id: mainUIGradient id: mainUIGradient
anchors.fill: parent anchors.fill: parent
scale: Math.max( 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 rotation: theme.ui.gradientRotation
gradient: Gradient { gradient: Gradient {
GradientStop { position: 0.0; color: theme.ui.gradientLeft } GradientStop { position: 0.0; color: theme.ui.gradientStart }
GradientStop { position: 1.0; color: theme.ui.gradientRight } GradientStop { position: 1.0; color: theme.ui.gradientEnd }
} }
} }

View File

@ -196,16 +196,16 @@ ui:
// If not specified, the gradient will be shown instead. // If not specified, the gradient will be shown instead.
url image: "" url image: ""
int gradientRotation: 45 * 3 int gradientRotation: -45
color gradientRight: color gradientStart:
Utils.hsluv(colors.hue - 50, 100, colors.intensity * 8, colors.opacity) hsluv(colors.hue - 50, 100, colors.intensity * 8, 1.0)
color gradientLeft: color gradientEnd:
Utils.hsluv(colors.hue + 20, 31, colors.intensity * 22, colors.opacity) hsluv(colors.hue + 20, 30, colors.intensity * 22, 1.0)
// To have a solid color instead, // To have a solid color instead,
// set gradientLeft and gradientRight to the same value. // set gradientStart and gradientEnd to the same value. Example:
// color gradientLeft: colors.weakBackground // color gradientStart: hsluv(0, 0, 0, 0.8)
// color gradientRight: colors.weakBackground // color gradientEnd: hsluv(0, 0, 0, 0.8)
@ -269,7 +269,10 @@ chat:
int radius: theme.radius int radius: theme.radius
color background: colors.strongBackground color background: colors.strongBackground
color ownBackground: hsluv( 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 color body: colors.text