From 1c23450805b52ceb05930902bff5d51d717f1027 Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 15 Mar 2020 14:27:10 -0400 Subject: [PATCH] Make events, checkbox, avatars respect radius --- src/gui/Base/HAvatar.qml | 1 + src/gui/Base/HCheckBox.qml | 2 +- src/gui/MainPane/Account.qml | 2 +- src/gui/Pages/Chat/Timeline/EventContent.qml | 2 ++ src/themes/Glass.qpl | 2 +- src/themes/Midnight.qpl | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/Base/HAvatar.qml b/src/gui/Base/HAvatar.qml index 0eee63d6..9c71a137 100644 --- a/src/gui/Base/HAvatar.qml +++ b/src/gui/Base/HAvatar.qml @@ -8,6 +8,7 @@ Rectangle { id: avatar implicitWidth: theme.controls.avatar.size implicitHeight: theme.controls.avatar.size + radius: theme.controls.avatar.radius color: avatarImage.visible ? "transparent" : utils.hsluv( name ? utils.hueFrom(name) : 0, diff --git a/src/gui/Base/HCheckBox.qml b/src/gui/Base/HCheckBox.qml index 031fe61f..a892822d 100644 --- a/src/gui/Base/HCheckBox.qml +++ b/src/gui/Base/HCheckBox.qml @@ -16,7 +16,7 @@ CheckBox { implicitHeight: implicitWidth x: box.leftPadding y: box.topPadding + box.availableHeight / 2 - height / 2 - radius: theme.radius / 1.5 + radius: theme.radius color: theme.controls.checkBox.boxBackground border.color: diff --git a/src/gui/MainPane/Account.qml b/src/gui/MainPane/Account.qml index 37c5a13c..78d8ceb4 100644 --- a/src/gui/MainPane/Account.qml +++ b/src/gui/MainPane/Account.qml @@ -23,7 +23,7 @@ HTileDelegate { userId: model.id displayName: model.display_name mxc: model.avatar_url - radius: mainPane.small ? circleRadius : 0 + radius: mainPane.small ? circleRadius : theme.controls.avatar.radius Behavior on radius { HNumberAnimation {} } } diff --git a/src/gui/Pages/Chat/Timeline/EventContent.qml b/src/gui/Pages/Chat/Timeline/EventContent.qml index 636bb31e..e10db2cd 100644 --- a/src/gui/Pages/Chat/Timeline/EventContent.qml +++ b/src/gui/Pages/Chat/Timeline/EventContent.qml @@ -154,6 +154,7 @@ HRowLayout { (pureMedia ? 0 : parent.leftPadding + parent.rightPadding), ) height: contentColumn.height + radius: theme.radius z: -100 color: isOwn? theme.chat.message.ownBackground : @@ -163,6 +164,7 @@ HRowLayout { visible: model.event_type === "RoomMessageNotice" width: theme.chat.message.noticeLineWidth height: parent.height + radius: parent.radius color: utils.nameColor( model.sender_name || model.sender_id.substring(1), ) diff --git a/src/themes/Glass.qpl b/src/themes/Glass.qpl index bb3e67ce..002aa794 100644 --- a/src/themes/Glass.qpl +++ b/src/themes/Glass.qpl @@ -10,7 +10,7 @@ int contentIsWideAbove: 472 * uiScale int baseElementsHeight: 36 * uiScale int spacing: 12 * uiScale -int radius: 5 * uiScale +int radius: 4 * uiScale int animationDuration: 100 real loadingElementsOpacity: 0.8 real disabledElementsOpacity: 0.3 diff --git a/src/themes/Midnight.qpl b/src/themes/Midnight.qpl index f9e8787c..19182f48 100644 --- a/src/themes/Midnight.qpl +++ b/src/themes/Midnight.qpl @@ -10,7 +10,7 @@ int contentIsWideAbove: 472 * uiScale int baseElementsHeight: 36 * uiScale int spacing: 12 * uiScale -int radius: 5 * uiScale +int radius: 4 * uiScale int animationDuration: 100 real loadingElementsOpacity: 0.8 real disabledElementsOpacity: 0.3