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

Commit

Permalink
Fix the space panel getting bigger when gaining a scroll bar (#12267)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dbkr authored Feb 21, 2024
1 parent d9a20b0 commit ebd0a04
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions res/css/structures/_SpacePanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
--activeBackground-color: $panel-actions;
--activeBorder-color: $primary-content;
--activeBorder-transparent-gap: 1px;
--gutterSize: 16px;
--gutterSize: 14px;
--height-nested: 24px;
--height-topLevel: 32px;

Expand All @@ -34,6 +34,10 @@ limitations under the License.
display: flex;
flex-direction: column;

&.collapsed {
width: 68px;
}

.mx_SpacePanel_toggleCollapse {
position: absolute;
width: 18px;
Expand Down Expand Up @@ -149,6 +153,11 @@ limitations under the License.
min-width: 0;
}

&.mx_SpaceButton_narrow .mx_SpaceButton_selectionWrapper {
flex: initial;
width: 32px;
}

.mx_SpaceButton_name {
flex: 1;
margin-left: 8px;
Expand Down Expand Up @@ -323,7 +332,8 @@ limitations under the License.
/* root space buttons are bigger and not indented */
& > .mx_AutoHideScrollbar {
flex: 1;
padding: 0 8px 16px 0;
padding: 0 0 16px 0;
scrollbar-gutter: stable;

& > .mx_SpaceButton {
height: var(--height-topLevel);
Expand Down Expand Up @@ -380,7 +390,7 @@ limitations under the License.
.mx_UserMenu {
padding-bottom: 12px;
border-bottom: 1px solid $separator;
margin: 12px 14px 4px 18px;
margin: 12px 14px 4px 16px;
max-width: 226px;
}
}
Expand Down

0 comments on commit ebd0a04

Please sign in to comment.