Skip to content

Commit cbe9ade

Browse files
authored
Merge pull request matrix-org#4756 from matrix-org/travis/room-list/dark
Initial dark theme support for new room list
2 parents 9eb9658 + f9a4151 commit cbe9ade

File tree

7 files changed

+41
-17
lines changed

7 files changed

+41
-17
lines changed

res/css/structures/_LeftPanel2.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ limitations under the License.
1616

1717
// TODO: Rename to mx_LeftPanel during replacement of old component
1818

19-
// TODO: Put these variables in the right place, or namespace them.
20-
$tagPanelWidth: 70px;
21-
$roomListMinimizedWidth: 50px;
19+
$tagPanelWidth: 70px; // only applies in this file, used for calculations
2220

2321
.mx_LeftPanel2 {
24-
background-color: $header-panel-bg-color;
22+
background-color: $roomlist2-bg-color;
2523
min-width: 260px;
2624
max-width: 50%;
2725

@@ -108,7 +106,7 @@ $roomListMinimizedWidth: 50px;
108106
width: 28px;
109107
height: 28px;
110108
border-radius: 20px;
111-
background-color: #fff; // TODO: Variable and theme
109+
background-color: $roomlist2-button-bg-color;
112110
position: relative;
113111
margin-left: 8px;
114112

res/css/structures/_RoomSearch.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
.mx_RoomSearch {
1919
flex: 1;
2020
border-radius: 20px;
21-
background-color: #fff; // TODO: Variable & theme
21+
background-color: $roomlist2-button-bg-color;
2222
height: 26px;
2323
padding: 2px;
2424

res/css/structures/_UserMenuButton.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ limitations under the License.
1919
}
2020

2121
.mx_UserMenuButton_contextMenu {
22-
width: 231px;
22+
width: 247px;
2323

2424
.mx_UserMenuButton_contextMenu_header {
2525
// Create a flexbox to organize the header a bit easier

res/css/views/rooms/_NotificationBadge.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ limitations under the License.
2727
// ^- The count is an element floating within that.
2828

2929
&.mx_NotificationBadge_visible {
30-
background-color: $roomtile2-badge-color;
30+
background-color: $roomtile2-default-badge-bg-color;
3131

3232
// Create a flexbox to order the count a bit easier
3333
display: flex;

res/css/views/rooms/_RoomSublist2.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ limitations under the License.
108108

109109
// This is the same color as the left panel background because it needs
110110
// to occlude the lastmost tile in the list.
111-
background-color: $header-panel-bg-color;
111+
background-color: $roomlist2-bg-color;
112112

113113
// Update the render() function for RoomSublist2 if these change
114114
// Update the ListLayout class for minVisibleTiles if these change.
@@ -198,7 +198,7 @@ limitations under the License.
198198
height: 24px;
199199
margin-left: 16px;
200200
visibility: visible;
201-
background-color: #fff; // TODO: Variable and theme
201+
background-color: $roomlist2-button-bg-color;
202202
}
203203
}
204204
}
@@ -226,7 +226,7 @@ limitations under the License.
226226
width: 32px !important; // !important to override hover styles
227227
height: 32px !important; // !important to override hover styles
228228
margin-left: 0 !important; // !important to override hover styles
229-
background-color: #fff; // TODO: Variable and theme
229+
background-color: $roomlist2-button-bg-color;
230230
margin-top: 8px;
231231

232232
&::before {
@@ -261,7 +261,7 @@ limitations under the License.
261261

262262
// This is the same color as the left panel background because it needs
263263
// to occlude the sublist title
264-
background-color: $header-panel-bg-color;
264+
background-color: $roomlist2-bg-color;
265265

266266
&::before {
267267
top: 0;

res/themes/dark/css/_dark.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,24 @@ $eventtile-meta-color: $roomtopic-color;
103103

104104
$header-divider-color: $header-panel-text-primary-color;
105105

106+
// ********************
107+
108+
// V2 Room List
109+
// TODO: Remove the 2 from all of these when the new list takes over
110+
111+
$theme-button-bg-color: #e3e8f0;
112+
113+
$roomlist2-button-bg-color: #1A1D23; // Buttons include the filter box, explore button, and sublist buttons
114+
$roomlist2-bg-color: $header-panel-bg-color;
115+
116+
$roomsublist2-divider-color: #e9eaeb;
117+
118+
$roomtile2-preview-color: #9e9e9e;
119+
$roomtile2-default-badge-bg-color: #61708b;
120+
$roomtile2-selected-bg-color: #1A1D23;
121+
122+
// ********************
123+
106124
$roomtile-name-color: $header-panel-text-primary-color;
107125
$roomtile-selected-color: $text-primary-color;
108126
$roomtile-notified-color: $text-primary-color;

res/themes/light/css/_light.scss

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,22 @@ $header-divider-color: #91A1C0;
172172

173173
// ********************
174174

175-
// TODO: Update variables for new room list
176-
// TODO: Dark theme
177-
$roomtile2-preview-color: #9e9e9e;
178-
$roomtile2-badge-color: #61708b;
179-
$roomtile2-selected-bg-color: #FFF;
175+
// V2 Room List
176+
// TODO: Remove the 2 from all of these when the new list takes over
177+
180178
$theme-button-bg-color: #e3e8f0;
179+
180+
$roomlist2-button-bg-color: #fff; // Buttons include the filter box, explore button, and sublist buttons
181+
$roomlist2-bg-color: $header-panel-bg-color;
182+
181183
$roomsublist2-divider-color: #e9eaeb;
182184

185+
$roomtile2-preview-color: #9e9e9e;
186+
$roomtile2-default-badge-bg-color: #61708b;
187+
$roomtile2-selected-bg-color: #FFF;
188+
189+
// ********************
190+
183191
$roomtile-name-color: #61708b;
184192
$roomtile-badge-fg-color: $accent-fg-color;
185193
$roomtile-selected-color: #212121;

0 commit comments

Comments
 (0)