# Link your development version of the extension with JupyterLab jupyter labextension develop.
JUPYTERLAB DARK THEME INSTALL
# Clone the repo to your local environment # Change directory to the jupyterlab_theme_solarized_dark directory # Install package in development mode The jlpm command is JupyterLab's pinned version of Note: You will need NodeJS to build the extension package.
navigate to Settings -> Advanced Settings Editor -> Theme, and add "theme-scrollbars": true to User Preferences.To enable theme scrollbars, in JupyterLab, either Or install it as a source extension: jupyter labextension install jupyterlab-theme-solarized-darkĪpply theme by checking Settings -> Jupyterlab Theme -> Jupyterlab Solarized Dark To install it as a prebuilt extension (requires JupyterLab >= 3.0): pip install jupyterlab_theme_solarized_dark Starting from v2.x, Jupyterlab v3.x support is added.v1.x aims to provide a smoother looking.v0.2.x is mainly based on Jae Hee Lee's original theme.The theme is originally created by Jae Hee Lee here Screenshot Sv.JupyterLab 2.x / 3.x Solarized Dark extension. ScrollViewer sv = VisualTreeHelper.GetChild (dp, 0) as ScrollViewer String strLine = Text.Substring (iOffset, iOffsetNext - iOffset) ĭrawingContext.DrawText (formattedText, new Point (leftMargin, topMargin - this.VerticalOffset)) ĭependencyObject dp = VisualTreeHelper.GetChild (this, 0) Int iOffsetNext = GetCharacterIndexFromLineIndex (iIdx + 1) Int iOffset = GetCharacterIndexFromLineIndex (iIdx) Int iEndVisibleLine = GetLastVisibleLineIndex () įor (int iIdx = iStartVisibleLine iIdx <= iEndVisibleLine - 1 ++iIdx) Int iStartVisibleLine = GetFirstVisibleLineIndex () ***formattedText.MaxTextWidth = this.ViewportWidth // space for scrollbar***įormattedText.MaxTextHeight = Math.Max (this.ActualHeight + this.VerticalOffset, 0) //Adjust for scrollingĭrawingContext.PushClip (new RectangleGeometry (new Rect (0, 0, this.ActualWidth, this.ActualHeight))) //restrict text to textbox Protected override void OnRender ( drawingContext)įormattedText formattedText = new FormattedText (īaseForeground) //Text that matches the textbox'sĭouble leftMargin = 4.0 + ĭouble topMargin = 2 + Void txtTest_TextChanged (object sender, TextChangedEventArgs e) New FrameworkPropertyMetadata (new SolidColorBrush (Colors.Black), FrameworkPropertyMetadataOptions.AffectsRender)) Public static DependencyProperty BaseForegroundProperty = DependencyProperty.Register ("BaseForeground", typeof (Brush), typeof (CodeBox), This.TextWrapping = īase.TextWrapping = This.Background = new SolidColorBrush (Colors.Transparent) This.Foreground = new SolidColorBrush (Colors.Transparent) This.TextChanged += new TextChangedEventHandler (txtTest_TextChanged) SolidColorBrush m_brBlack = new SolidColorBrush (Colors.Black)
SolidColorBrush m_brOrange = new SolidColorBrush (Colors.Orange) SolidColorBrush m_brRed = new SolidColorBrush (Colors.Red)
JUPYTERLAB DARK THEME CODE
The rest (that has been reomved) is just code that does more text-coloring. This is the code-behind C#, lengthy, but it has been trimmed down to only enough to show what's going on. I'm fairly new to WPF and there's much to it that is still mysterious to me, so the solution may be obvious to someone with more experience with it. "formattedText.MaxTextWidth = this.ViewportWidth // space for scrollbar" I've tracked the problem to a line in OnRender: The scrollbar is visible and it changes the size of the drag button to show that it sees that the unwrapped text is wider than the viewing area, but since the text has already been wrapped, dragging it doesn't make any difference. I've tried adding a horizontal scrollbar but that doesn't help. In a normal TextBox, simply setting the TextWrapping property to NoWrap does the trick, but not with CodeBox (which inherits from TextBox in code-behind). I've used the CodeBox project from CodeProject and it works very well except for the fact that I can't disable text wrapping.