diff --git a/src/components/views/settings/ChangeAvatar.js b/src/components/views/settings/ChangeAvatar.js
index f5ec6a0467..7f19b193f7 100644
--- a/src/components/views/settings/ChangeAvatar.js
+++ b/src/components/views/settings/ChangeAvatar.js
@@ -25,6 +25,8 @@ module.exports = React.createClass({
room: React.PropTypes.object,
// if false, you need to call changeAvatar.onFileSelected yourself.
showUploadSection: React.PropTypes.bool,
+ width: React.PropTypes.number,
+ height: React.PropTypes.number,
className: React.PropTypes.string
},
@@ -37,7 +39,9 @@ module.exports = React.createClass({
getDefaultProps: function() {
return {
showUploadSection: true,
- className: "mx_Dialog_content" // FIXME - shouldn't be this by default
+ className: "mx_Dialog_content", // FIXME - shouldn't be this by default
+ width: 80,
+ height: 80,
};
},
@@ -111,13 +115,14 @@ module.exports = React.createClass({
// Having just set an avatar we just display that since it will take a little
// time to propagate through to the RoomAvatar.
if (this.props.room && !this.avatarSet) {
- avatarImg = ;
+ avatarImg = ;
} else {
var style = {
- maxWidth: 240,
- maxHeight: 240,
+ width: this.props.width,
+ height: this.props.height,
objectFit: 'cover',
};
+ // FIXME: surely we should be using MemberAvatar or UserAvatar or something here...
avatarImg =
;
}