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 &&
((props.ourContact.avatar !== null) && !props.hideAvatars) ((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 : <Sigil
ship={window.ship} ship={window.ship}
size={16} size={16}

View File

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

View File

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

View File

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

View File

@ -297,7 +297,13 @@ function Participant(props: {
const avatar = const avatar =
contact?.avatar !== null && !hideAvatars ? ( 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}`} /> <Sigil ship={contact.patp} size={32} color={`#${color}`} />
); );