Sublime Forum

Styled Tooltips

#1

I have been working on a plugin that will automatically style the Sublime tooltip based on the users current color scheme. I wanted to provide a standardized method to style tooltips. I have not added this as a package to Package Control yet as it is very much still in the alpha phase, but I thought I would post a link here to see if anyone wanted to give it a try.

The plugin will parse the users color scheme and generate a theme_styles.css file which contains all of the scopes supported by the scheme. The user can then use common scopes to style elements within the html rather than creating their own custom style sheets to be used.

A new command was created to automatically add the style sheet code and then call the view’s show_popup function so to implement this plugin, one simply needs to replace calls to view.show_popup with view.run_command(“styled_tooltip”, {“content”: “Your HTML here”}). All parameters of view.show_popup are supported and are passed to the view.show_popup function call that is nested within the command.

I would greatly appreciate any feedback regarding the overall concept of the plugin. The code is still very rough and needs to be refactored and commented, but this is the inital alpha release.

You can download a copy here: https://github.com/huot25/StyledTooltip

https://raw.githubusercontent.com/huot25/StyledTooltip/master/screen_shots/screen_1.png

0 Likes

#2

This would be great for Anaconda, it’s using the tooltips already but styled ones would really look nice!

0 Likes