Skip to content

Commit fad2f61

Browse files
committed
fix issue #23 add label to the enable switch
1 parent c5ad118 commit fad2f61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

NeuralRack/gui/NeuralRack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void plugin_create_controller_widgets(X11_UI *ui, const char * plugin_uri) {
182182
ui->widget[16] = add_lv2_label (ui->widget[16], ui->win, 22, "Latency", ui, 90, 22, 130, 30);
183183
ui->widget[17] = add_lv2_label (ui->widget[17], ui->win, 23, "Xrun", ui, 410, 22, 100, 30);
184184

185-
ui->widget[10] = add_lv2_switch (ui->widget[10], ui->win, 14, "", ui, 505, 17, 50, 50);
185+
ui->widget[10] = add_lv2_switch (ui->widget[10], ui->win, 14, "Enable", ui, 505, 12, 50, 50);
186186

187187
// noisegate
188188
ui->elem[4] = create_widget(&ui->main, ui->win, 10, 60, 600, 70);

NeuralRack/gui/widgets.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,10 @@ static void draw_my_switch(void *w_, void* user_data) {
729729
cairo_text_extents_t extents;
730730
cairo_select_font_face (wid->crb, "Sans", CAIRO_FONT_SLANT_NORMAL,
731731
CAIRO_FONT_WEIGHT_BOLD);
732-
cairo_set_source_rgba(wid->crb, 0.4, 0.4, 0.4, 1);
732+
cairo_set_source_rgba(wid->crb, 0.6, 0.6, 0.6, 1);
733733
cairo_set_font_size (wid->crb, wid->app->small_font/wid->scale.ascale);
734734
cairo_text_extents(wid->crb,wid->label , &extents);
735-
cairo_move_to (wid->crb, (w*0.5)-(extents.width/2), h*2 -(extents.height*0.4));
735+
cairo_move_to (wid->crb, (wid->width*0.5)-(extents.width*0.5), wid->height - 4 -(extents.height));
736736
cairo_show_text(wid->crb, wid->label);
737737
cairo_new_path (wid->crb);
738738

0 commit comments

Comments
 (0)