tintinweb / vscode-inline-bookmarks

Customizable inline Bookmarks for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=tintinweb.vscode-inline-bookmarks
GNU General Public License v3.0
47 stars 14 forks source link

Feature: Use data-uri for SVG icons to allow custom colors (#30) #42

Closed rkodey closed 3 years ago

rkodey commented 3 years ago

Closes #30 Add gutterIconColor to accept any RGBA color for the icon Add helper functions to create SVG data-uri and default decorations Add default blue if no icon path or color is provided

Hi- I'm really getting a lot of use out of your extension! Hopefully you'll find these pull requests useful. Thanks!

rkodey commented 3 years ago

This commit fixes a bug I introduced, and removes the dependency on filename convention for the SVGs. The getChildren methods are called quite often, and thus I didn't want to re-calculate the icon data URI every time. So, I leveraged controller.styles to store additional data as an object. It seemed like an appropriate place to save it.

Technically the 4 static SVG files could be removed entirely at this point, but would require modifications to the readme and consideration for backward compatibility.

tintinweb commented 3 years ago

excellent work @rkodey 🙌

haven't thought of data-uris before 😂 finally a solution that allows us to get rid of the damn hardcoded svg 🙌