1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

specify exact sidebar mid width

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2020-10-06 09:40:32 -04:00
parent 372e0f233b
commit 4d9d373092

View File

@ -55,15 +55,6 @@ export class MainLayout extends React.Component<Props> {
this.sidebarWidth = newWidth
}
sidebarMinWidth(): number {
const headerPadding = 4 * 2 // 4px * (1 for right + 1 for left)
const appIcon = 28
const appName = 40
const pinningIcon = 22 + 10 // 10 for hover circle
const goodMeasure = 10
return headerPadding + appIcon + appName + pinningIcon + goodMeasure
}
render() {
const { className, headerClass, footer, footerClass, children } = this.props;
const cluster = getHostedCluster();
@ -86,7 +77,7 @@ export class MainLayout extends React.Component<Props> {
onDrag={this.adjustWidth}
onDoubleClick={this.toggleSidebar}
disabled={!this.isPinned}
minExtent={this.sidebarMinWidth()}
minExtent={120}
maxExtent={400}
/>
</aside>