landscape: correct avatar aspect ratio

Author avatar uses objectFit='cover'

ProfileOverlay avatar uses objectFit='cover'

ChatInput uses objectFit='cover'

Participants avatar uses objectFit='cover'

Landscape: correct avatar aspect ratio.
This commit is contained in:
0x70b1a5 2021-02-27 14:33:36 -05:00 committed by Tobias
parent 6bcbbf8f1a
commit 612d93c807
5 changed files with 17 additions and 2 deletions

View File

@ -130,7 +130,13 @@ class ChatInput extends Component<ChatInputProps, ChatInputState> {
props.ourContact &&
((props.ourContact.avatar !== null) && !props.hideAvatars)
)
? <BaseImage src={props.ourContact.avatar} height={16} width={16} className="dib" />
? <BaseImage
src={props.ourContact.avatar}
height={16}
width={16}
style={{ objectFit: 'cover' }}
display='inline-block'
/>
: <Sigil
ship={window.ship}
size={16}

View File

@ -278,6 +278,7 @@ export const MessageAuthor = ({
contact?.avatar && !hideAvatars ? (
<BaseImage
display='inline-block'
style={{ objectFit: 'cover' }}
src={contact.avatar}
height={16}
width={16}

View File

@ -47,6 +47,7 @@ export default function Author(props: AuthorProps): ReactElement {
<BaseImage
display='inline-block'
src={contact.avatar}
style={{ objectFit: 'cover' }}
height={16}
width={16}
/>

View File

@ -98,6 +98,7 @@ class ProfileOverlay extends PureComponent<
contact?.avatar && !hideAvatars ? (
<BaseImage
display='inline-block'
style={{ objectFit: 'cover' }}
src={contact.avatar}
height={72}
width={72}

View File

@ -297,7 +297,13 @@ function Participant(props: {
const avatar =
contact?.avatar !== null && !hideAvatars ? (
<img src={contact.avatar} height={32} width={32} className="dib" />
<img
src={contact.avatar}
height={32}
width={32}
display='inline-block'
style={{ objectFit: 'cover' }}
/>
) : (
<Sigil ship={contact.patp} size={32} color={`#${color}`} />
);