Color "upload profile picture" icon

Also fix hover zone to span the entire avatar rectangle
This commit is contained in:
miruka 2019-08-28 18:47:04 -04:00
parent e1da7be253
commit 1806ac6ac0
2 changed files with 7 additions and 7 deletions

View File

@ -3,8 +3,6 @@
- Theming - Theming
- File format - File format
- Make the icon blue in EditAccount when hovering and no avatar set
- Remove the filled theme
- Have a default background - Have a default background
- Composer - Composer

View File

@ -74,22 +74,25 @@ HGridLayout {
anchors.fill: parent anchors.fill: parent
color: Utils.hsluv(0, 0, 0, color: Utils.hsluv(0, 0, 0,
(! avatar.imageUrl && overlayHover.hovered) ? 0.9 : 0.7 (! avatar.imageUrl && overlayHover.hovered) ? 0.8 : 0.7
) )
Behavior on opacity { HNumberAnimation {} } Behavior on opacity { HNumberAnimation {} }
Behavior on color { HColorAnimation {} } Behavior on color { HColorAnimation {} }
HoverHandler { id: overlayHover }
HColumnLayout { HColumnLayout {
anchors.centerIn: parent anchors.centerIn: parent
spacing: currentSpacing spacing: currentSpacing
width: parent.width width: parent.width
HoverHandler { id: overlayHover }
HIcon { HIcon {
svgName: "upload-avatar" svgName: "upload-avatar"
colorize: (! avatar.imageUrl && overlayHover.hovered) ?
theme.colors.accentText : theme.icons.colorize
dimension: 64 dimension: 64
Layout.alignment: Qt.AlignCenter Layout.alignment: Qt.AlignCenter
} }
@ -98,8 +101,7 @@ HGridLayout {
HLabel { HLabel {
text: qsTr("Upload profile picture") text: qsTr("Upload profile picture")
color: (! avatar.imageUrl && overlayHover.hovered) ? color: (! avatar.imageUrl && overlayHover.hovered) ?
Qt.lighter(theme.colors.accentText, 1.2) : theme.colors.accentText : theme.colors.brightText
Utils.hsluv(0, 0, 90, 1)
Behavior on color { HColorAnimation {} } Behavior on color { HColorAnimation {} }
font.pixelSize: theme.fontSize.big * font.pixelSize: theme.fontSize.big *