Update bubble layout styling for stickers (#7560)
This commit is contained in:
parent
aed09ee2f6
commit
f217c6fd61
2 changed files with 23 additions and 3 deletions
|
@ -126,12 +126,14 @@ limitations under the License.
|
||||||
border-bottom-right-radius: var(--cornerRadius);
|
border-bottom-right-radius: var(--cornerRadius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_EventTile_avatar {
|
.mx_EventTile_avatar {
|
||||||
left: -34px;
|
left: -34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
--backgroundColor: $eventbubble-others-bg;
|
--backgroundColor: $eventbubble-others-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-self=true] {
|
&[data-self=true] {
|
||||||
.mx_EventTile_line {
|
.mx_EventTile_line {
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -144,6 +146,11 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_EventTile_sticker {
|
||||||
|
// align timestamp with those inside bubbles
|
||||||
|
margin-right: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_ThreadInfo {
|
.mx_ThreadInfo {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: calc(-1 * var(--gutterSize));
|
margin-right: calc(-1 * var(--gutterSize));
|
||||||
|
@ -195,7 +202,8 @@ limitations under the License.
|
||||||
z-index: 3; // above media and location share maps
|
z-index: 3; // above media and location share maps
|
||||||
}
|
}
|
||||||
|
|
||||||
&.mx_EventTile_mediaLine {
|
// we put the timestamps for media (other than stickers) atop the media along with a gradient to aid visibility
|
||||||
|
&.mx_EventTile_mediaLine:not(.mx_EventTile_sticker) {
|
||||||
.mx_MessageTimestamp {
|
.mx_MessageTimestamp {
|
||||||
color: #ffffff; // regardless of theme, always visible on the below gradient
|
color: #ffffff; // regardless of theme, always visible on the below gradient
|
||||||
}
|
}
|
||||||
|
@ -214,6 +222,18 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.mx_EventTile_sticker {
|
||||||
|
> a {
|
||||||
|
// position timestamps for stickers to the right of the un-bubbled sticker
|
||||||
|
right: unset;
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_MStickerBody_wrapper {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//noinspection CssReplaceWithShorthandSafely
|
//noinspection CssReplaceWithShorthandSafely
|
||||||
.mx_MImageBody {
|
.mx_MImageBody {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -1106,9 +1106,9 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
const EventTileType = sdk.getComponent(tileHandler);
|
const EventTileType = sdk.getComponent(tileHandler);
|
||||||
const isProbablyMedia = MediaEventHelper.isEligible(this.props.mxEvent);
|
const isProbablyMedia = MediaEventHelper.isEligible(this.props.mxEvent);
|
||||||
|
|
||||||
const lineClasses = classNames({
|
const lineClasses = classNames("mx_EventTile_line", {
|
||||||
mx_EventTile_line: true,
|
|
||||||
mx_EventTile_mediaLine: isProbablyMedia,
|
mx_EventTile_mediaLine: isProbablyMedia,
|
||||||
|
mx_EventTile_sticker: this.props.mxEvent.getType() === EventType.Sticker,
|
||||||
});
|
});
|
||||||
|
|
||||||
const isSending = (['sending', 'queued', 'encrypting'].indexOf(this.props.eventSendStatus) !== -1);
|
const isSending = (['sending', 'queued', 'encrypting'].indexOf(this.props.eventSendStatus) !== -1);
|
||||||
|
|
Loading…
Reference in a new issue