Missing icontheme.h
Opened this issue · 4 comments
Using GetColorThemeStruct
to access the current theme's colors requires knowing the layout of ColorTheme
. SWS has a (likely very out of date) copy of icontheme.h, but it is otherwise not available anywhere I can find.
(from reaper_plugin_functions.h)
// GetColorThemeStruct
// returns the whole color theme (icontheme.h) and the size
// GetIconThemeStruct
// returns a pointer to the icon theme (icontheme.h) and the size of that struct
It is a better idea to use GetThemeColor() with named colors. Exposing the ColorTheme struct was probably not a great idea to begin with.
Thanks!
Back then I didn't want to use GetThemeColor
to be compatible with prior versions. (Ended up reversing parts of struct's layout as of v6.24rc7–here in case anyone else needs it–but ultimately never used it...)
There are also use cases that can't be updated to today's GetThemeColor
. For instance, SWS uses GetIconThemeStruct
to read images and preset height values for envelopes/tracks.
Ah yeah we should add ways to query those. Or we could put icontheme.h in the SDK, we go to efforts to only ever add to those structs anyway
(but I don't like it)