More robust badge positioning

This commit is contained in:
wmwragg 2016-09-16 11:34:16 +01:00
parent e2b695827e
commit 72e108c4f9
2 changed files with 25 additions and 6 deletions

View File

@ -422,12 +422,12 @@ var RoomSubList = React.createClass({
}, },
_createOverflowTile: function(overflowCount, totalCount) { _createOverflowTile: function(overflowCount, totalCount) {
var content = <div className="mx_RoomSubList_chevronDown"></div>;
return ( return (
<div className="mx_RoomSubList_ellipsis" onClick={this._showFullMemberList}> <div className="mx_RoomSubList_ellipsis" onClick={this._showFullMemberList}>
<div className="mx_RoomSubList_line"></div> <div className="mx_RoomSubList_line"></div>
<div className="mx_RoomSubList_more">more</div> <div className="mx_RoomSubList_more">more</div>
<div className="mx_RoomSubList_moreBadge"></div> <div className="mx_RoomSubList_moreBadge">{ content }</div>
<div className="mx_RoomSubList_chevronDown"></div>
</div> </div>
); );
}, },

View File

@ -159,6 +159,10 @@ limitations under the License.
font-size: 13px; font-size: 13px;
} }
.collapsed .mx_RoomSubList_ellipsis {
height: 16px;
}
.mx_RoomSubList_line { .mx_RoomSubList_line {
display: inline-block; display: inline-block;
width: 159px; width: 159px;
@ -166,6 +170,10 @@ limitations under the License.
vertical-align: middle; vertical-align: middle;
} }
.collapsed .mx_RoomSubList_line {
display: none;
}
.mx_RoomSubList_more { .mx_RoomSubList_more {
display: inline-block; display: inline-block;
text-transform: uppercase; text-transform: uppercase;
@ -179,6 +187,10 @@ limitations under the License.
vertical-align: middle; vertical-align: middle;
} }
.collapsed .mx_RoomSubList_more {
display: none;
}
.mx_RoomSubList_moreBadge { .mx_RoomSubList_moreBadge {
display: inline-block; display: inline-block;
min-width: 15px; min-width: 15px;
@ -199,9 +211,16 @@ limitations under the License.
vertical-align: middle; vertical-align: middle;
} }
.mx_RoomSubList_ellipsis .mx_RoomSubList_chevronDown { .collapsed .mx_RoomSubList_moreBadge {
position: absolute; position: static;
top: 4px; margin-left: 16px;
right: 16px; margin-top: 2px;
} }
.mx_RoomSubList_ellipsis .mx_RoomSubList_chevronDown {
position: relative;
top: 4px;
left: 2px;
}