sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

Sidebar file icon layers rendered in wrong order

Open iccir opened this issue 1 month ago • 1 comments

Description of the bug

Per the Sublime documentation, layer0 is "the bottom-most texture layer for the element."

My assumption is that layer1 is always drawn over layer0, layer2 is always drawn over layer1, etc. This assumption seems to be true for most elements.

However, when dealing with the sidebar tree, I'm seeing layer0 sometimes drawn over layer1.

Steps to reproduce

  1. Edit the icon_file_type rule of "Default.sublime-theme" to the following:
{
  "class": "icon_file_type",
  "content_margin": [9, 8],

  // "layer0.texture" filled by Sublime to match file type
  "layer0.tint": "white",
  "layer0.opacity": 1.0,
            
  "layer1.texture": "Theme - Default/common/button.png",
  "layer1.tint": "green",
  "layer1.opacity": 1.0,
},
  1. Open a folder with mixed file types.

  2. For some file types, layer0 is (correctly) drawn as the bottommost layer. For other file types, layer0 is drawn on top of layer1.

In this screenshot, the white file type icons should never be visible, as the green layer1 texture should always be drawn over them.

Image

Expected behavior

In the above screenshot, no white icons should be visible, they should always be covered by a green square.

Actual behavior

White icons are visible (layer0 is drawn on top of layer1).

Sublime Text build number

4200

Operating system & version

macOS 14.7

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information


iccir avatar Dec 15 '25 17:12 iccir

Seems to be related with opengl rendering pipeline.

When running ST with "hardware_acceleration": "none", layer order seems ok. Never see any white icon on any file type, regardless its state (selected, hovered, ...)

With "hardware_acceleration": "opengl" however some files display the white layer0 symbols. Funnily hover direction seems to have an impact. Moving mouse from top to down over items, makes the symbols disappear, and moving upwards they appear again.

Image

deathaxe avatar Dec 15 '25 17:12 deathaxe