fix composer avatar

This commit is contained in:
Matthew Hodgson 2015-11-13 02:44:46 +00:00
parent 20f84ce322
commit f8d628d336
3 changed files with 8 additions and 8 deletions

View file

@ -15,8 +15,8 @@ limitations under the License.
*/ */
.mx_MemberAvatar { .mx_MemberAvatar {
position: relative;
z-index: 20; z-index: 20;
border-radius: 20px;
} }
.mx_MemberAvatar_initial { .mx_MemberAvatar_initial {
@ -25,6 +25,6 @@ limitations under the License.
text-align: center; text-align: center;
} }
.mx_MemberAvatar_wrapper { .mx_MemberAvatar_image {
position: relative; border-radius: 20px;
} }

View file

@ -36,9 +36,9 @@ limitations under the License.
height: 70px; height: 70px;
} }
.mx_MessageComposer .mx_MessageComposer_avatar img { .mx_MessageComposer .mx_MessageComposer_avatar .mx_MemberAvatar {
display: block;
margin-top: 18px; margin-top: 18px;
border-radius: 20px;
} }
.mx_MessageComposer_input { .mx_MessageComposer_input {

View file

@ -49,18 +49,18 @@ module.exports = React.createClass({
initial = this.props.member.name[1].toUpperCase(); initial = this.props.member.name[1].toUpperCase();
return ( return (
<span className="mx_MemberAvatar_wrapper"> <span className="mx_MemberAvatar">
<span className="mx_MemberAvatar_initial" <span className="mx_MemberAvatar_initial"
style={{ fontSize: (this.props.width * 0.75) + "px", style={{ fontSize: (this.props.width * 0.75) + "px",
width: this.props.width + "px", width: this.props.width + "px",
lineHeight: this.props.height*1.2 + "px" }}>{ initial }</span> lineHeight: this.props.height*1.2 + "px" }}>{ initial }</span>
<img className="mx_MemberAvatar" src={this.state.imageUrl} <img className="mx_MemberAvatar_image" src={this.state.imageUrl}
onError={this.onError} width={this.props.width} height={this.props.height} /> onError={this.onError} width={this.props.width} height={this.props.height} />
</span> </span>
); );
} }
return ( return (
<img className="mx_MemberAvatar" src={this.state.imageUrl} <img className="mx_MemberAvatar mx_MemberAvatar_image" src={this.state.imageUrl}
onError={this.onError} onError={this.onError}
width={this.props.width} height={this.props.height} /> width={this.props.width} height={this.props.height} />
); );