Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit ebd0a04

Browse files
authored
Fix the space panel getting bigger when gaining a scroll bar (#12267)
* Fix the space panel getting bigger when gaining a scroll bar Just makes the scrollbar gutter stable and removes 8px of padding to compensate, so it will make the bar slightly larger, but it will no longer change size weirdly if you have too many spaces in too short a window. * Tweak margins to keep space panel the same size * Try 1px more * Try 1px more to the left * Fix sizes and disable flex when in narrow mode * Update screenshots * Another screenshot * Last screenshot hopefully
1 parent d9a20b0 commit ebd0a04

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed
12 Bytes
Loading
221 Bytes
Loading
221 Bytes
Loading
11 Bytes
Loading

res/css/structures/_SpacePanel.pcss

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
--activeBackground-color: $panel-actions;
1919
--activeBorder-color: $primary-content;
2020
--activeBorder-transparent-gap: 1px;
21-
--gutterSize: 16px;
21+
--gutterSize: 14px;
2222
--height-nested: 24px;
2323
--height-topLevel: 32px;
2424

@@ -34,6 +34,10 @@ limitations under the License.
3434
display: flex;
3535
flex-direction: column;
3636

37+
&.collapsed {
38+
width: 68px;
39+
}
40+
3741
.mx_SpacePanel_toggleCollapse {
3842
position: absolute;
3943
width: 18px;
@@ -149,6 +153,11 @@ limitations under the License.
149153
min-width: 0;
150154
}
151155

156+
&.mx_SpaceButton_narrow .mx_SpaceButton_selectionWrapper {
157+
flex: initial;
158+
width: 32px;
159+
}
160+
152161
.mx_SpaceButton_name {
153162
flex: 1;
154163
margin-left: 8px;
@@ -323,7 +332,8 @@ limitations under the License.
323332
/* root space buttons are bigger and not indented */
324333
& > .mx_AutoHideScrollbar {
325334
flex: 1;
326-
padding: 0 8px 16px 0;
335+
padding: 0 0 16px 0;
336+
scrollbar-gutter: stable;
327337

328338
& > .mx_SpaceButton {
329339
height: var(--height-topLevel);
@@ -380,7 +390,7 @@ limitations under the License.
380390
.mx_UserMenu {
381391
padding-bottom: 12px;
382392
border-bottom: 1px solid $separator;
383-
margin: 12px 14px 4px 18px;
393+
margin: 12px 14px 4px 16px;
384394
max-width: 226px;
385395
}
386396
}

0 commit comments

Comments
 (0)