1
0
Fork 0

Add some more styling for the vizia ParamSlider

This still doesn't really work well since we can't focus the textbox.
This commit is contained in:
Robbert van der Helm 2022-03-19 17:47:50 +01:00
parent a6e35cfaa9
commit 80db6121f3
2 changed files with 9 additions and 1 deletions

View file

@ -23,3 +23,10 @@ param-slider:hover {
param-slider .fill { param-slider .fill {
background-color: #c4c4c4; background-color: #c4c4c4;
} }
/* This is a textbox, but we want it to appear just like the label */
param-slider .value-entry {
/* Vizia doesn't support the unset value */
background-color: transparent;
border-width: 0px;
}

View file

@ -55,9 +55,10 @@ enum ParamSliderInternalEvent {
} }
impl Model for ParamSliderInternal { impl Model for ParamSliderInternal {
fn event(&mut self, _cx: &mut Context, event: &mut Event) { fn event(&mut self, cx: &mut Context, event: &mut Event) {
if let Some(ParamSliderInternalEvent::SetTextInputActive(value)) = event.message.downcast() if let Some(ParamSliderInternalEvent::SetTextInputActive(value)) = event.message.downcast()
{ {
cx.current.set_active(cx, *value);
self.text_input_active = *value; self.text_input_active = *value;
} }
} }