Quellcode durchsuchen

Merge pull request #5425 from ellisonbg/sidebar-sizing

Use setRelativeSizes to set initial width of side panel.
Jason Grout vor 6 Jahren
Ursprung
Commit
c3c75f1b28

+ 3 - 0
packages/application/src/shell.ts

@@ -122,6 +122,9 @@ export class ApplicationShell extends Widget {
 
     rootLayout.direction = 'top-to-bottom';
     rootLayout.spacing = 0; // TODO make this configurable?
+    // Use relative sizing to set the width of the side panels.
+    // This will still respect the min-size of children widget in the stacked panel.
+    hsplitPanel.setRelativeSizes([1, 2.5, 1]);
 
     BoxLayout.setStretch(topPanel, 0);
     BoxLayout.setStretch(hboxPanel, 1);

+ 1 - 1
packages/theme-dark-extension/style/variables.css

@@ -352,5 +352,5 @@ all of MD as it is not optimized for dense, information rich UIs.
 
   /* Sidebar-related styles */
 
-  --jp-sidebar-min-width: 250px;
+  --jp-sidebar-min-width: 180px;
 }

+ 1 - 1
packages/theme-light-extension/style/variables.css

@@ -349,5 +349,5 @@ all of MD as it is not optimized for dense, information rich UIs.
 
   /* Sidebar-related styles */
 
-  --jp-sidebar-min-width: 250px;
+  --jp-sidebar-min-width: 180px;
 }