Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing icontheme.h #1

Open
cfillion opened this issue Feb 14, 2021 · 4 comments
Open

Missing icontheme.h #1

cfillion opened this issue Feb 14, 2021 · 4 comments

Comments

@cfillion
Copy link
Contributor

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
@justinfrankel
Copy link
Owner

It is a better idea to use GetThemeColor() with named colors. Exposing the ColorTheme struct was probably not a great idea to begin with.

@cfillion
Copy link
Contributor Author

cfillion commented May 9, 2022

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.

@justinfrankel
Copy link
Owner

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

@justinfrankel
Copy link
Owner

(but I don't like it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants