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

Don't refer styles IDs with strings directly in ButtonSet::addItem() #4188

Closed
dacap opened this issue Nov 30, 2023 · 0 comments · Fixed by #4454
Closed

Don't refer styles IDs with strings directly in ButtonSet::addItem() #4188

dacap opened this issue Nov 30, 2023 · 0 comments · Fixed by #4454
Assignees
Milestone

Comments

@dacap
Copy link
Member

dacap commented Nov 30, 2023

We should replace all instances of ButtonSet::addItem(..., const char* styleId) with a Style* using the skin style pointers instead of the string ID. E.g. instead of

  addItem(SkinTheme::get(this)->parts.dynamics(), "dynamics_field");
```

Use:
```c++
  auto theme = SkinTheme::get(this);
  addItem(theme->parts.dynamics(), theme->styles.dynamicsField());
```

So we check style names in compile-time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants