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

Vizia ParamButton Initialization issue #169

Open
vsandstrom opened this issue Sep 23, 2024 · 0 comments
Open

Vizia ParamButton Initialization issue #169

vsandstrom opened this issue Sep 23, 2024 · 0 comments

Comments

@vsandstrom
Copy link

When trying to style the ParamButton, I try to switch color depending on the state of the button and underlying value.
In what I deduce from reading the examples, the false state should also be the unchecked state.

github.com/vsandstrom/Havregryn/releases/tag/0.1.0

Behavior:

  • When starting a new instance of the plugin I am working on, it always starts with the color scheme of checked.
  • When pressing the button, it leaves a checked truthy state, although only the GUI responds like this. The event that would have been triggered by a true state does not trigger on the audio thread.

It seems that it could be an issue with how the ParamButton struct is initialized or how it interfaces with the Vizia API.

/* lib.rs */
impl Default for HavregrynParams {
  fn default() -> Self {
    Self {
      // (...)
      resample: BoolParam::new(
        "sample", 
        false
      )
      // (...)
    }
  }
}
/* styles.css */
.sample:checked {
  background-color: #fafafa;
  color: #0a0a0a;
}

.sample:hover {
  background-color: #ff255c;
  color: #fafafa;
  opacity: 0.6;
}

.sample {
  background-color: #ff255c;
  opacity: 0.8;
  color: #fafafa;
}
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

1 participant