From 6d9d9a56b4bef9501439d847da59420c241902e0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 13 Jan 2022 16:42:32 +0000 Subject: [PATCH] Apply border-radius onto linear gradient in bubble layout (#7536) --- res/css/views/rooms/_EventBubbleTile.scss | 24 +++++++++++++++++------ src/settings/enums/Layout.ts | 5 ----- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 2dbfb5f481..8e04701339 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -117,7 +117,9 @@ limitations under the License. .mx_EventTile_line { border-bottom-right-radius: var(--cornerRadius); - .mx_MImageBody .mx_MImageBody_thumbnail { + .mx_MImageBody .mx_MImageBody_thumbnail, + .mx_MImageBody::before, + .mx_MLocationBody_map { border-bottom-right-radius: var(--cornerRadius); } } @@ -132,7 +134,9 @@ limitations under the License. float: right; border-bottom-left-radius: var(--cornerRadius); - .mx_MImageBody .mx_MImageBody_thumbnail { + .mx_MImageBody .mx_MImageBody_thumbnail, + .mx_MImageBody::before, + .mx_MLocationBody_map { border-bottom-left-radius: var(--cornerRadius); } } @@ -231,14 +235,18 @@ limitations under the License. &.mx_EventTile_continuation[data-self=false] .mx_EventTile_line { border-top-left-radius: 0; - .mx_MImageBody .mx_MImageBody_thumbnail, .mx_MLocationBody_map { + .mx_MImageBody .mx_MImageBody_thumbnail, + .mx_MImageBody::before, + .mx_MLocationBody_map { border-top-left-radius: 0; } } &.mx_EventTile_lastInSection[data-self=false] .mx_EventTile_line { border-bottom-left-radius: var(--cornerRadius); - .mx_MImageBody .mx_MImageBody_thumbnail, .mx_MLocationBody_map { + .mx_MImageBody .mx_MImageBody_thumbnail, + .mx_MImageBody::before, + .mx_MLocationBody_map { border-bottom-left-radius: var(--cornerRadius); } } @@ -246,14 +254,18 @@ limitations under the License. &.mx_EventTile_continuation[data-self=true] .mx_EventTile_line { border-top-right-radius: 0; - .mx_MImageBody .mx_MImageBody_thumbnail, .mx_MLocationBody_map { + .mx_MImageBody .mx_MImageBody_thumbnail, + .mx_MImageBody::before, + .mx_MLocationBody_map { border-top-right-radius: 0; } } &.mx_EventTile_lastInSection[data-self=true] .mx_EventTile_line { border-bottom-right-radius: var(--cornerRadius); - .mx_MImageBody .mx_MImageBody_thumbnail, .mx_MLocationBody_map { + .mx_MImageBody .mx_MImageBody_thumbnail, + .mx_MImageBody::before, + .mx_MLocationBody_map { border-bottom-right-radius: var(--cornerRadius); } } diff --git a/src/settings/enums/Layout.ts b/src/settings/enums/Layout.ts index d4e1f06c0a..1b64ceab15 100644 --- a/src/settings/enums/Layout.ts +++ b/src/settings/enums/Layout.ts @@ -15,14 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import PropTypes from 'prop-types'; - /* TODO: This should be later reworked into something more generic */ export enum Layout { IRC = "irc", Group = "group", Bubble = "bubble", } - -/* We need this because multiple components are still using JavaScript */ -export const LayoutPropType = PropTypes.oneOf(Object.values(Layout));