how to make scroll bar indicator more clear and easy to see?

后端 未结 4 1615
粉色の甜心
粉色の甜心 2020-12-28 17:56

Using Submine test 3, build 3083 on windows 7.
Currently using Dawn.tm theme, selected from Preferences->Color themes

The only problem

4条回答
  •  鱼传尺愫
    2020-12-28 18:16

    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 scroll_puck.pngVertical scrollbar and scroll_puck_horiz.pngHorizontal 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.

提交回复
热议问题