Sublime Forum

Unsightly line parallel to vertical scrollbar when horizontal scrollbar is displayed

#1

Using: ST 3126, Linux

Recently I’ve noticed that when the horizontal scrollbar is being displayed a vertical line appears parallel to the vertical scrollbar or, if the minimap is on, then on the left of that.

It appears with both the default theme and colour scheme and with the various installed themes and colour schemes which I have tried (Boxy, Predawn).

It does not make any difference what overlay_scroll_bars is set to.

Is anyone else experiencing this? To reproduce turn word-wrap off and make the ST window width narrower until the horizontal scrollbar appears. I would have expected an issue, in the SublimeTextIssues repository, or a forum post here about it but I can not find any mention of this problem.

If no one else has this problem - any ideas what might be causing it?

Thanks.

P.S. In case anyone points this out - I restarted ST after changing themes and when changing the value of overlay_scroll_bars.

Here are some screenshots with the default ST theme, and the Boxy and Predawn themes:

Screenshots - As it should be - No horizontal scrollbar so no vertical line

Screenshots - Minimap on - Horizontal scrollbar results in vertical line on left of minimap

Note about the image below: overlay_scroll_bars set to enabled so horizontal scrollbar not actually shown but would be if it had been set to system.

Screenshots - Minimap off - Horizontal scrollbar results in vertical line on left of scrollbar - harder to see

0 Likes

#2

This is controlled by the color scheme, shadowWidth and shadow keys. I once raised an issue about it on the undocs because it was unclear at the time: https://github.com/guillermooo/sublime-undocs/issues/193

4 Likes

#3

@kingkeith

Thanks so much, that did the trick - completely gone.

By the way I think some change in v.3126 made this shadow more visible. After posting I reverted to v.3114 and I could barely see the line.

In case anyone wants to know exactly what to do to get rid of the unsightly line / shadow effect, here’s what to do.

Edit the colour scheme file that you are using. That’s the file in the "color_scheme": "Packages/Whatever/Theme Name.tmTheme" setting in your preferences.

Near the top you’ll find a section that looks something like this code:

    <key>settings</key>
    <array>
        <dict>
            <key>settings</key>
            <dict>
                <key>background</key>
                <string>#1d1f21</string>
                <key>caret</key>
                <string>#F8F8F0</string>
                <key>foreground</key>
                <string>#c5c8c6</string>
                <key>gutter</key>
                <string>#1d1f21</string>
                <key>lineHighlight</key>
                <string>#ffffff10</string>
                <key>selection</key>
                <string>#5d1d15</string>
                <key>selectionForeground</key>
                <string>#fffff8</string>
                <key>selectionBorder</key>
                <string>#555555</string>
                <key>shadow</key>
                <string>#1d1f21</string>
                <key>shadowWidth</key>
                <string>42</string>
            </dict>

Near the bottom I added:

<key>shadow</key>
<string>#1d1f21</string>
<key>shadowWidth</key>
<string>42</string>

Add the same 4 lines of code but change the <key>shadow</key> colour, in my case <string>#1d1f21</string>, to the same value as the <key>background</key> colour in your .tmTheme file just as I have done above.

Hope this helps.

EDIT:

In tests by FichteFoll, which I have also done and found the same thing, to make the unsightly line / shadow effect disappear completely it is enough just to add the <key>shadowWidth</key> with an accompaning value of 33 or greater. It is not necessary to also set the <key>shadow</key> colour to the same value as the <key>background</key> colour.

<key>shadowWidth</key>
<string>33</string>
1 Like

#4

In case anyone else like me is searching for this in the future: You can set the undocumented setting draw_shadows to false. (Source, linked in the issue mentioned above.)

0 Likes