Skip to content

Instantly share code, notes, and snippets.

@bwonur
Last active October 25, 2021 02:51
Show Gist options
  • Select an option

  • Save bwonur/c4b5dd363386dcfaf4489125eaab875b to your computer and use it in GitHub Desktop.

Select an option

Save bwonur/c4b5dd363386dcfaf4489125eaab875b to your computer and use it in GitHub Desktop.
how to make scroll bar indicator more clear and easy to see?

In your user folder you can override the themes properties you want. In this case there is a minor problem as the scrollbar texture (the image that contains the scrollbar with the top and bottom semicircles) is quite dark, so although you modify the tint you can't get a light color similar to white unless you change that texture (image).

So the solution I pruposse is to create two new images (horizontal and vertical scrollbar) that are lighter, set it in the theme preference overrides and then (optionally) set the tint color you want.

Step by step tutorial

  1. Locate your sublime User folder (Packages/User). The Packages folder can be opened using the sublime menu Preferences>Browse Packages, inside is located the User folder.

  2. Inside User folder create a directory called theme_override. We are going to place here all the files and settings of our theme that we want to override.

  3. Inside this folder (theme_override) put this two images and name them Vertical scrollbar and Horizontal scrollbar.

  4. Inside theme_override, create a file with the name of your theme. If you are using the default theme the file should be named Default.sublime-theme. If you are not using the default theme you can see the name of the theme you are using in Settings>Preferences>theme, and then create a file with that name (for example Material-Theme-Darker.sublime-theme) inside theme_override Inside this new file place the following content:

    [    
        // More visible scrollbar
        {
            "class": "puck_control",
            "layer0.texture": "User/theme_override/scroll_puck.png",
            // Optional: set to your desired RGB color
            "layer0.tint": [40, 170, 250],
            "layer0.opacity": 1.0,
            "layer1.opacity": 0.0,
            "layer0.inner_margin": 2
        },
        {
            "class": "puck_control",
            "attributes": ["horizontal"],
            "layer0.texture": "User/theme_override/scroll_puck_horiz.png"
        }
    ]
    
  5. Restart sublime text

  6. Optional modify RGB color (no need to restart again).

EDIT: this is the result

Result

EDIT: added basic info for people that are not using the default theme.

Note: if you are not using the default theme the results might change depending on the values that your theme overrides. If you want to know what values your theme is using, and you want to customize them, you can see them inside the .sublime-package file of your theme. For example, if you are using Material Theme open Material Theme.sublime-package (this is just a zip file) and inside there will be a file called Material-Theme-Darker.sublime-theme, you should not modify this file, but you can customize/override whatever you want using the file we have created in step 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment