Make selection look better

This commit is contained in:
miruka 2020-03-26 21:01:36 -04:00
parent 2d471b70f5
commit a61f1d5d04
5 changed files with 22 additions and 10 deletions

View File

@ -229,8 +229,8 @@ HRowLayout {
z: -100 z: -100
color: eventDelegate.checked && color: eventDelegate.checked &&
! contentLabel.selectedText && ! contentLabel.selectedText &&
! mousePointHandler.active? ! mousePointHandler.active ?
"lightseagreen" : // XXX theme.chat.message.checkedBackground :
isOwn? isOwn?
theme.chat.message.ownBackground : theme.chat.message.ownBackground :

View File

@ -49,7 +49,9 @@ HTile {
Binding on backgroundColor { Binding on backgroundColor {
value: "blue" // XXX value: theme.chat.message.checkedBackground
when: eventDelegate.checked when: eventDelegate.checked
} }
Behavior on backgroundColor { HColorAnimation {} }
} }

View File

@ -130,9 +130,13 @@ HMxcImage {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
visible: eventDelegate.checked visible: opacity > 0
// XXX color: theme.chat.message.checkedBackground
color: "blue" opacity:
opacity: 0.2 eventDelegate.checked ?
theme.chat.message.thumbnailCheckedOverlayOpacity :
0
Behavior on opacity { HNumberAnimation {} }
} }
} }

View File

@ -345,6 +345,7 @@ chat:
color background: colors.mediumBackground color background: colors.mediumBackground
color ownBackground: colors.strongBackground color ownBackground: colors.strongBackground
color checkedBackground: colors.accentBackground
color body: colors.text color body: colors.text
color date: colors.dimText color date: colors.dimText
@ -394,6 +395,8 @@ chat:
// by default 0.4 for 40%. // by default 0.4 for 40%.
real thumbnailMaxHeightRatio: 0.4 * Math.min(1, uiScale) real thumbnailMaxHeightRatio: 0.4 * Math.min(1, uiScale)
real thumbnailCheckedOverlayOpacity: 0.4
daybreak: daybreak:
color background: colors.mediumBackground color background: colors.mediumBackground
color text: colors.text color text: colors.text

View File

@ -47,7 +47,7 @@ colors:
color strongBackground: color strongBackground:
hsluv(hue, bgSaturation * 2, intensity, opacity) hsluv(hue, bgSaturation * 2, intensity, opacity)
color accentBackground: hsluv(hue, saturation, intensity * 32, 1) color accentBackground: hsluv(hue, saturation, intensity * 40, 1)
color accentElement: hsluv(hue, saturation * 1.5, intensity * 52, 1) color accentElement: hsluv(hue, saturation * 1.5, intensity * 52, 1)
color strongAccentElement: hsluv(hue, saturation * 1.5, intensity * 72, 1) color strongAccentElement: hsluv(hue, saturation * 1.5, intensity * 72, 1)
@ -356,8 +356,9 @@ chat:
int horizontalSpacing: theme.spacing / 1.25 int horizontalSpacing: theme.spacing / 1.25
int verticalSpacing: theme.spacing / 1.75 int verticalSpacing: theme.spacing / 1.75
color background: colors.weakBackground color background: colors.weakBackground
color ownBackground: colors.mediumBackground color ownBackground: colors.mediumBackground
color checkedBackground: colors.accentBackground
color body: colors.text color body: colors.text
color date: colors.dimText color date: colors.dimText
@ -407,6 +408,8 @@ chat:
// by default 0.4 for 40%. // by default 0.4 for 40%.
real thumbnailMaxHeightRatio: 0.4 * Math.min(1, uiScale) real thumbnailMaxHeightRatio: 0.4 * Math.min(1, uiScale)
real thumbnailCheckedOverlayOpacity: 0.4
daybreak: daybreak:
color background: colors.mediumBackground color background: colors.mediumBackground
color text: colors.text color text: colors.text