When are TML icons loaded?At TBC startup, the MacroManager command looks for new or updated TMLs (.py or .pydll files with newer timestamps than previously loaded) and adds them or updates them in the TML dictionary (.dict file in the TML folder, .dict2 file in TBC v5.50+)
Part of the loading process includes adding/updating a "tool" in the ribbon layout for each TML.
I am not sure if updating your .png file (only that file) will cause the TML dictionary to update - I'm guessing it does NOT.
Reload all TMLs in a folder:
Delete the .dict/.dict2 file
Reload an individual TML:
Modify the .py/.pydll file and re-save, so the modified date is newer than previously loaded.
NOTE: Updating a TML in the dictionary will NOT automatically update the ribbon. It "should" update the icon for the ribbon "tool" in the ribbon layout (ie the "default" icon), but it won't update the "current" ribbon. You'll need to "reset to default" the icon for the ribbon items to get the updated "tool" icon.
"Set Ribbon Tabs" commandUsing the "Reset to Defaults" button will reset the currently loaded ribbon "tab layout" to it's default tabs, tab contents (and icons), and tab visibility, but I do NOT think it reloads the TML dictionary.
NOTE: While it sets the ribbon values to match the default values, if you go into the Customize Ribbon command (Customize the Ribbon dialog), you'll see that the ribbon editor considers many (all?) of the values to now be "custom". I think the end result is the same, but if you then go to Customize Ribbon, it looks like everything has been customized.
"Customize Ribbon" command("Customize the Ribbon" dialog)
Here, you can actually reset customizations to the actual ribbon
Reset everything via "Reset" > Reset All Customizations
You can select individual items and reset their image too
Note: these will reset the image to the "tool" image - it won't reload the TML dictionary
PNG file guidelinesTransparency - use the PNG feature for transparency (alpha channel). Partial transparency of colors is supported. So you can have a dark blue fade to transparent, vs. always fading to white.
PNG image sizesTBC commands (including TMLs) use two sizes: 19x19 (small) and 38x38 (large)
These match the specific icon sizes supported by the ribbon.
There are many other TBC features (like the icon at the top of the Command Pane, icons in the Command List, icons in window title bars, etc.) that use the original 16x16 icon size, and so your 19x19 icons will get resized (blurred), but that's an issue that all commands (not just TMLs) are stuck with.
The original sizes were 16x16 and 32x32, but when the ribbon was added, they changed to 19x19 and 38x38.
TML CmdData icon propertiesIn TBC v5.0, CmdData released with:
ImageSmall - Used for both large and small icons. The guidance was to use 38x38 icons so the large image looks good and the small image gets resized (good enough). ImageSmall is used for traditional, light and dark themes.
In TBC v5.2, they added:
ImageLight - Used for the light theme. If null, fallback to ImageSmall
ImageDark - Used for the dark theme. If null, fallback to ImageSmall
In TBC v5.5, they added
ImageLarge - Used for large icon, all themes. If null, fallback to ImageSmall
ImageLightLarge - Used for large icon, light theme. If null, I'm guessing fallback to ImageLight. Guessing fallback to ImageLarge if no ImageLight.
ImageDarkLarge - Used for large icon, dark theme. If null, I'm guessing fallback to ImageDark. Guessing fallbck to ImageLarge if no ImageDark
PNG editorsI've used the free app Paint.NET (https://www.getpaint.net/) for basic image editing since 2006 - was introduced to it by one of the other TBC devs.
At the time one bonus over MS Paint, was it supported transparency. So you could do gradient transparency.
Paint.NET has support for layers if you want to create icon components (like a plus sign for create, pencil for edit, etc.) and combine them together (linestring icon + plus sign = create linestring!). Many a TBC command mock-up icon was created with Paint.NET - and many later deemed "good enough" and included in the product (not my decision ;-)
I'm sure there are better (even free) tools for icon creation/management, but I haven't looked into it yet.
Hope those answers help! (It's on the list to someday publish docs/tips around these topics :)
------------------------------
Quan Mueller
Revenant Solutions - TML Development
------------------------------
Original Message:
Sent: 07-13-2021 20:19
From: Ronny Schneider
Subject: replace/reload macro icons - best software to create icons
Hi,
I've got a hard time to update macro icons once TBC had loaded one already. Restarting, resetting Ribbon Tabs and restarting doesn't work.
Sometimes it works with moving the macros somewhere else, restarting TBC, resetting tabs, restarting, resetting tabs ..., but I haven't found out the exact order yet.
There must be an easier way.
Or does it fall back to an old version if it doesn't like the new one? Are there any specifics for the PNG format, transparency to look out for? I figured that the icon shouldn't be bigger than 38x38 pixel.
What software are you guys using to create icons?
------------------------------
Ronny Schneider
------------------------------