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 {
position: relative;
z-index: 20;
border-radius: 20px;
}
.mx_MemberAvatar_initial {
@ -25,6 +25,6 @@ limitations under the License.
text-align: center;
}
.mx_MemberAvatar_wrapper {
position: relative;
.mx_MemberAvatar_image {
border-radius: 20px;
}

View File

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

View File

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