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

Commit

Permalink
Fix waste of space of collapsed left panel
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Zuenko <anton@zuenko.ru>
  • Loading branch information
azuenko committed Aug 5, 2019
1 parent ab05d8c commit a3eb45e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions res/css/structures/_LeftPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ limitations under the License.

.mx_LeftPanel_container.collapsed {
min-width: unset;
/* Collapsed LeftPanel 70px */
flex: 0 0 70px;
/* Collapsed LeftPanel 50px */
flex: 0 0 50px;
}

.mx_LeftPanel_container.collapsed.mx_LeftPanel_container_hasTagPanel {
/* TagPanel 70px + Collapsed LeftPanel 70px */
flex: 0 0 140px;
/* TagPanel 70px + Collapsed LeftPanel 50px */
flex: 0 0 120px;
}

.mx_LeftPanel_tagPanelContainer {
Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_RoomSubList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ limitations under the License.
}

.mx_RoomSubList_labelContainer {
margin-right: 14px;
margin-right: 8px;
margin-left: 2px;
}

Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_TopLeftMenuButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
display: flex;
align-items: center;
min-width: 0;
padding: 0 7px;
padding: 0 4px;
overflow: hidden;
}

Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_RoomTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ limitations under the License.

.collapsed {
.mx_RoomTile {
margin: 0 2px;
margin: 0 6px;
padding: 0 2px;
position: relative;
justify-content: center;
Expand Down
4 changes: 3 additions & 1 deletion src/components/structures/TopLeftMenuButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ export default class TopLeftMenuButton extends React.Component {
render() {
const name = this._getDisplayName();
let nameElement;
let chevronElement;
if (!this.props.collapsed) {
nameElement = <div className="mx_TopLeftMenuButton_name">
{ name }
</div>;
chevronElement = <span className="mx_TopLeftMenuButton_chevron" />;
}

return (
Expand All @@ -121,7 +123,7 @@ export default class TopLeftMenuButton extends React.Component {
resizeMethod="crop"
/>
{ nameElement }
<span className="mx_TopLeftMenuButton_chevron" />
{ chevronElement }
</AccessibleButton>
);
}
Expand Down

0 comments on commit a3eb45e

Please sign in to comment.