Make events, checkbox, avatars respect radius

This commit is contained in:
miruka 2020-03-15 14:27:10 -04:00
parent abdaf13da5
commit 1c23450805
6 changed files with 7 additions and 4 deletions

View File

@ -8,6 +8,7 @@ Rectangle {
id: avatar id: avatar
implicitWidth: theme.controls.avatar.size implicitWidth: theme.controls.avatar.size
implicitHeight: theme.controls.avatar.size implicitHeight: theme.controls.avatar.size
radius: theme.controls.avatar.radius
color: avatarImage.visible ? "transparent" : utils.hsluv( color: avatarImage.visible ? "transparent" : utils.hsluv(
name ? utils.hueFrom(name) : 0, name ? utils.hueFrom(name) : 0,

View File

@ -16,7 +16,7 @@ CheckBox {
implicitHeight: implicitWidth implicitHeight: implicitWidth
x: box.leftPadding x: box.leftPadding
y: box.topPadding + box.availableHeight / 2 - height / 2 y: box.topPadding + box.availableHeight / 2 - height / 2
radius: theme.radius / 1.5 radius: theme.radius
color: theme.controls.checkBox.boxBackground color: theme.controls.checkBox.boxBackground
border.color: border.color:

View File

@ -23,7 +23,7 @@ HTileDelegate {
userId: model.id userId: model.id
displayName: model.display_name displayName: model.display_name
mxc: model.avatar_url mxc: model.avatar_url
radius: mainPane.small ? circleRadius : 0 radius: mainPane.small ? circleRadius : theme.controls.avatar.radius
Behavior on radius { HNumberAnimation {} } Behavior on radius { HNumberAnimation {} }
} }

View File

@ -154,6 +154,7 @@ HRowLayout {
(pureMedia ? 0 : parent.leftPadding + parent.rightPadding), (pureMedia ? 0 : parent.leftPadding + parent.rightPadding),
) )
height: contentColumn.height height: contentColumn.height
radius: theme.radius
z: -100 z: -100
color: isOwn? color: isOwn?
theme.chat.message.ownBackground : theme.chat.message.ownBackground :
@ -163,6 +164,7 @@ HRowLayout {
visible: model.event_type === "RoomMessageNotice" visible: model.event_type === "RoomMessageNotice"
width: theme.chat.message.noticeLineWidth width: theme.chat.message.noticeLineWidth
height: parent.height height: parent.height
radius: parent.radius
color: utils.nameColor( color: utils.nameColor(
model.sender_name || model.sender_id.substring(1), model.sender_name || model.sender_id.substring(1),
) )

View File

@ -10,7 +10,7 @@ int contentIsWideAbove: 472 * uiScale
int baseElementsHeight: 36 * uiScale int baseElementsHeight: 36 * uiScale
int spacing: 12 * uiScale int spacing: 12 * uiScale
int radius: 5 * uiScale int radius: 4 * uiScale
int animationDuration: 100 int animationDuration: 100
real loadingElementsOpacity: 0.8 real loadingElementsOpacity: 0.8
real disabledElementsOpacity: 0.3 real disabledElementsOpacity: 0.3

View File

@ -10,7 +10,7 @@ int contentIsWideAbove: 472 * uiScale
int baseElementsHeight: 36 * uiScale int baseElementsHeight: 36 * uiScale
int spacing: 12 * uiScale int spacing: 12 * uiScale
int radius: 5 * uiScale int radius: 4 * uiScale
int animationDuration: 100 int animationDuration: 100
real loadingElementsOpacity: 0.8 real loadingElementsOpacity: 0.8
real disabledElementsOpacity: 0.3 real disabledElementsOpacity: 0.3