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 {
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" }
}
}

View File

@ -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 }
}
}

View File

@ -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