theme: Add colors for minimap thumb and border (#30785)

A user on Discord reported an issue where the minimap thumb was fully
opaque:

<img
src="https://github.com/user-attachments/assets/5049c6a3-f89a-4ceb-9d1b-ec06e7fe9151"
height="300">

This can happen because the scrollbar and its thumb might not
neccessarily be transparent at all.

Thus, this PR adds the`minimap.thumb.background` and
`minimap.thumb.border` colors to themes so theme authors can specify
custom colors for both here.
Furthermore, I ensured that the minimap thumb background fallback value
can never be entirely opaque. The values were arbitrarily chosen to
avoid the issue from occuring whilst keeping currently working setups
working. With the new properties added, authors (and users) should be
able to avoid running into this issue altogether so I would argue for
this special casing to be fine. However, open to change it should a
different approach be preferrred.

Release Notes:

- Added `minimap.thumb.background` and `minimap.thumb.border` to themes
to customize the thumb color and background of the minimap.
- Fixed an issue where the minimap thumb could be opaque if the theme
did not specify a color for the thumb.
This commit is contained in:
Finn Evers 2025-05-26 20:23:41 +02:00 committed by GitHub
parent 8a24f9f280
commit 4c396bcc91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 194 additions and 67 deletions

View file

@ -174,6 +174,7 @@ impl VsCodeThemeConverter {
scrollbar_thumb_border: vscode_scrollbar_slider_background.clone(),
scrollbar_track_background: vscode_editor_background.clone(),
scrollbar_track_border: vscode_colors.editor_overview_ruler.border.clone(),
minimap_thumb_background: vscode_colors.minimap_slider.background.clone(),
editor_foreground: vscode_editor_foreground
.clone()
.or(vscode_token_colors_foreground.clone()),