Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix waste of space of collapsed left panel #2668

Merged
merged 1 commit into from Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions res/css/structures/_LeftPanel.scss
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
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
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
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
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