diff --git a/res/css/structures/_RoomSubList.scss b/res/css/structures/_RoomSubList.scss
index 4661913b1e..4fea201e9a 100644
--- a/res/css/structures/_RoomSubList.scss
+++ b/res/css/structures/_RoomSubList.scss
@@ -32,17 +32,17 @@ limitations under the License.
}
.mx_RoomSubList_labelContainer {
- height: 31px; /* mx_RoomSubList_label height including border */
- position: relative;
+ display: flex;
+ flex-direction: row;
}
.mx_RoomSubList_label {
+ flex: 1;
position: relative;
text-transform: uppercase;
color: $roomsublist-label-fg-color;
font-weight: 700;
- font-size: 12px;
- height: 19px; /* height + padding = 31px = mx_RoomSubList_label height */
+ font-size: 14px;
margin-left: 16px;
padding-left: 16px; /* gutter */
padding-right: 16px; /* gutter */
@@ -59,15 +59,6 @@ limitations under the License.
/* pointer-events: none; */
}
-.mx_RoomSubList_roomCount {
- display: inline-block;
- font-size: 12px;
- font-weight: normal;
- color: $accent-color;
- padding-left: 5px;
- text-transform: none;
-}
-
.mx_RoomSubList_badge {
display: inline-block;
min-width: 15px;
@@ -90,6 +81,20 @@ limitations under the License.
filter: brightness($focus-brightness);
}
+.mx_RoomSubList_addRoom {
+ background-color: $roomheader-addroom-color;
+ color: $roomsublist-background;
+ margin: 5px 10px;
+ border-radius: 9px;
+ text-align: center;
+ vertical-align: middle;
+ line-height: 18px;
+ font-weight: bold;
+ font-size: 18px;
+ width: 18px;
+ height: 18px;
+}
+
.mx_RoomSubList_badgeHighlight {
background-color: $warning-color;
}
@@ -146,10 +151,6 @@ limitations under the License.
width: 28px; /* collapsed LHS Panel width */
}
- .mx_RoomSubList_roomCount {
- display: none;
- }
-
/* Hide the bottom of speech bubble */
.mx_RoomSubList_badgeHighlight:after {
display: none;
diff --git a/res/css/views/elements/_AccessibleButton.scss b/res/css/views/elements/_AccessibleButton.scss
index edf455049b..d6702a232c 100644
--- a/res/css/views/elements/_AccessibleButton.scss
+++ b/res/css/views/elements/_AccessibleButton.scss
@@ -16,9 +16,8 @@ limitations under the License.
.mx_AccessibleButton:focus {
outline: 0;
- filter: brightness($focus-brightness);
}
.mx_AccessibleButton {
cursor: pointer;
-}
\ No newline at end of file
+}
diff --git a/res/themes/dharma/css/_dharma.scss b/res/themes/dharma/css/_dharma.scss
index ea6b24dec4..4e4b2cd66f 100644
--- a/res/themes/dharma/css/_dharma.scss
+++ b/res/themes/dharma/css/_dharma.scss
@@ -109,6 +109,7 @@ $rte-group-pill-color: #aaa;
$topleftmenu-color: #212121;
$roomheader-color: #45474a;
+$roomheader-addroom-color: #929eb4;
$roomtopic-color: #9fa9ba;
// ********************
diff --git a/res/themes/light/css/_base.scss b/res/themes/light/css/_base.scss
index 228f44fdef..c17eba5398 100644
--- a/res/themes/light/css/_base.scss
+++ b/res/themes/light/css/_base.scss
@@ -108,6 +108,7 @@ $rte-group-pill-color: #aaa;
$topleftmenu-color: $primary-fg-color;
$roomheader-color: $primary-fg-color;
+$roomheader-addroom-color: $primary-bg-color;
$roomtopic-color: $settings-grey-fg-color;
// ********************
diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js
index 8a017c9252..a6117b1a00 100644
--- a/src/components/structures/RoomSubList.js
+++ b/src/components/structures/RoomSubList.js
@@ -266,13 +266,11 @@ const RoomSubList = React.createClass({
},
_getHeaderJsx: function() {
+ const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
const subListNotifications = this.roomNotificationCount();
const subListNotifCount = subListNotifications[0];
const subListNotifHighlight = subListNotifications[1];
- const totalTiles = this.props.list.length + (this.props.extraTiles || []).length;
- const roomCount = totalTiles > 0 ? totalTiles : '';
-
const chevronClasses = classNames({
'mx_RoomSubList_chevron': true,
'mx_RoomSubList_chevronRight': this.state.hidden,
@@ -299,9 +297,6 @@ const RoomSubList = React.createClass({
let title;
if (this.props.collapsed) {
title = this.props.label;
- if (roomCount !== '') {
- title += " [" + roomCount + "]";
- }
}
let incomingCall;
@@ -319,9 +314,17 @@ const RoomSubList = React.createClass({
}
}
+ let addRoomButton;
+ if (this.props.onAddRoom) {
+ addRoomButton = (
+