Add GtkDial:can_control property

If the dial can't be controlled, it shouldn't be dimmed when it's not
sensitive.
This commit is contained in:
Geoffrey D. Bennett
2024-01-28 20:10:22 +10:30
parent 72d45a0987
commit 1c2d966763
7 changed files with 47 additions and 9 deletions

View File

@@ -60,7 +60,8 @@ static void gain_updated(
GtkWidget *make_gain_alsa_elem(
struct alsa_elem *elem,
int zero_is_off,
int widget_taper
int widget_taper,
int can_control
) {
struct gain *data = g_malloc(sizeof(struct gain));
data->elem = elem;
@@ -102,6 +103,8 @@ GtkWidget *make_gain_alsa_elem(
2
);
gtk_dial_set_can_control(GTK_DIAL(data->dial), can_control);
data->label = gtk_label_new(NULL);
gtk_widget_set_vexpand(data->dial, TRUE);