]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
updated sliders panel height
authorJohn Melton G0ORX <john.d.melton@googlemail.com>
Tue, 15 Oct 2019 13:21:54 +0000 (14:21 +0100)
committerJohn Melton G0ORX <john.d.melton@googlemail.com>
Tue, 15 Oct 2019 13:21:54 +0000 (14:21 +0100)
radio.c
radio_menu.c
sliders.c

diff --git a/radio.c b/radio.c
index 46f938285ead5dc1ac5b85b0a9883a82e10e37a9..43fd88a9c48cd9bc4a6b246d1d1085a96b50f001 100644 (file)
--- a/radio.c
+++ b/radio.c
@@ -85,7 +85,7 @@
 #define METER_HEIGHT (60)
 #define METER_WIDTH (200)
 #define PANADAPTER_HEIGHT (105)
-#define SLIDERS_HEIGHT (90)
+#define SLIDERS_HEIGHT (100)
 #define TOOLBAR_HEIGHT (30)
 #define WATERFALL_HEIGHT (105)
 #ifdef PSK
index 26d5ab3b2d7943ac26080efbd4aa1e0ba32facb3..62840fe188353c74baf3a3edc48c7fce963f058d 100644 (file)
@@ -572,31 +572,28 @@ void radio_menu(GtkWidget *parent) {
     if(radio->info.soapy.rx_gains>0) {
       GtkWidget *rx_gain=gtk_label_new("Rx Gains:");
       gtk_grid_attach(GTK_GRID(grid),rx_gain,col,row,1,1);
-      row++;
-    }
-
-
-    if(radio->info.soapy.rx_has_automatic_gain) {
-      GtkWidget *agc=gtk_check_button_new_with_label("Hardware AGC: ");
-      gtk_grid_attach(GTK_GRID(grid),agc,col,row,1,1);
-      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(agc),adc[0].agc);
-      g_signal_connect(agc,"toggled",G_CALLBACK(agc_changed_cb),&adc[0]);
-      row++;
     }
 
-    row=temp_row;
-
     if(can_transmit) {
       if(radio->info.soapy.tx_gains>0) {
         col=2;
         GtkWidget *tx_gain=gtk_label_new("Tx Gains:");
         gtk_grid_attach(GTK_GRID(grid),tx_gain,col,row,1,1);
-        row++;
       }
     }
 
+    row++;
     temp_row=row;
 
+    if(radio->info.soapy.rx_has_automatic_gain) {
+      GtkWidget *agc=gtk_check_button_new_with_label("Hardware AGC: ");
+      gtk_grid_attach(GTK_GRID(grid),agc,col,row,1,1);
+      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(agc),adc[0].agc);
+      g_signal_connect(agc,"toggled",G_CALLBACK(agc_changed_cb),&adc[0]);
+      row++;
+    }
+
+
     for(i=0;i<radio->info.soapy.rx_gains;i++) {
       col=0;
       GtkWidget *rx_gain_label=gtk_label_new(radio->info.soapy.rx_gain[i]);
index 0631e34ef72abc4a8070bac1b01dbc88497207d8..f6ffca5c2d4af7d0b75abb0a9f52de989509cb77 100644 (file)
--- a/sliders.c
+++ b/sliders.c
@@ -497,7 +497,7 @@ void set_drive(double value) {
       scale_dialog=gtk_dialog_new_with_buttons("Drive",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
       GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
       drive_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.00);
-      //gtk_widget_override_font(drive_scale, pango_font_description_from_string("Sans 10"));
+      gtk_widget_override_font(drive_scale, pango_font_description_from_string("Sans 10"));
       gtk_widget_set_size_request (drive_scale, 400, 30);
       gtk_range_set_value (GTK_RANGE(drive_scale),value);
       gtk_widget_show(drive_scale);
@@ -566,7 +566,7 @@ void set_squelch() {
       scale_dialog=gtk_dialog_new_with_buttons("Squelch",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
       GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
       squelch_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.00);
-      //gtk_widget_override_font(squelch_scale, pango_font_description_from_string("Sans 10"));
+      gtk_widget_override_font(squelch_scale, pango_font_description_from_string("Sans 10"));
       gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch);
       gtk_widget_set_size_request (squelch_scale, 400, 30);
       gtk_widget_show(squelch_scale);
@@ -601,7 +601,7 @@ void set_compression(TRANSMITTER* tx) {
       scale_dialog=gtk_dialog_new_with_buttons("COMP",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
       GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
       comp_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 20.0, 1.00);
-      //gtk_widget_override_font(comp_scale, pango_font_description_from_string("Sans 10"));
+      gtk_widget_override_font(comp_scale, pango_font_description_from_string("Sans 10"));
       gtk_range_set_value (GTK_RANGE(comp_scale),tx->compressor_level);
       gtk_widget_set_size_request (comp_scale, 400, 30);
       gtk_widget_show(comp_scale);
@@ -687,24 +687,24 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height);
   gtk_grid_set_column_homogeneous(GTK_GRID(sliders),TRUE);
 
   af_gain_label=gtk_label_new("AF:");
-  //gtk_widget_override_font(af_gain_label, pango_font_description_from_string("Sans 11"));
+  gtk_widget_override_font(af_gain_label, pango_font_description_from_string("Sans 10"));
   gtk_widget_show(af_gain_label);
   gtk_grid_attach(GTK_GRID(sliders),af_gain_label,0,0,1,1);
 
   af_gain_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.00);
-  //gtk_widget_override_font(af_gain_scale, pango_font_description_from_string("Sans 10"));
+  gtk_widget_override_font(af_gain_scale, pango_font_description_from_string("Sans 10"));
   gtk_range_set_value (GTK_RANGE(af_gain_scale),active_receiver->volume*100.0);
   gtk_widget_show(af_gain_scale);
   gtk_grid_attach(GTK_GRID(sliders),af_gain_scale,1,0,2,1);
   g_signal_connect(G_OBJECT(af_gain_scale),"value_changed",G_CALLBACK(afgain_value_changed_cb),NULL);
 
   agc_gain_label=gtk_label_new("AGC:");
-  //gtk_widget_override_font(agc_gain_label, pango_font_description_from_string("Sans 11"));
+  gtk_widget_override_font(agc_gain_label, pango_font_description_from_string("Sans 10"));
   gtk_widget_show(agc_gain_label);
   gtk_grid_attach(GTK_GRID(sliders),agc_gain_label,3,0,1,1);
 
   agc_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,-20.0, 120.0, 1.0);
-  //gtk_widget_override_font(agc_scale, pango_font_description_from_string("Sans 10"));
+  gtk_widget_override_font(agc_scale, pango_font_description_from_string("Sans 10"));
   gtk_range_set_value (GTK_RANGE(agc_scale),active_receiver->agc_gain);
   gtk_widget_show(agc_scale);
   gtk_grid_attach(GTK_GRID(sliders),agc_scale,4,0,2,1);
@@ -717,7 +717,7 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height);
   sprintf(title,"ATT (dB)"/*,active_receiver->adc*/);
 #endif
   attenuation_label=gtk_label_new(title);
-  //gtk_widget_override_font(attenuation_label, pango_font_description_from_string("Sans 11"));
+  gtk_widget_override_font(attenuation_label, pango_font_description_from_string("Sans 10"));
   gtk_widget_show(attenuation_label);
   gtk_grid_attach(GTK_GRID(sliders),attenuation_label,6,0,1,1);
 
@@ -728,18 +728,18 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height);
        attenuation_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 31.0, 1.0);
        gtk_range_set_value (GTK_RANGE(attenuation_scale),adc_attenuation[active_receiver->adc]);
 #endif
-  //gtk_widget_override_font(attenuation_scale, pango_font_description_from_string("Sans 10"));
+  gtk_widget_override_font(attenuation_scale, pango_font_description_from_string("Sans 10"));
   
   gtk_widget_show(attenuation_scale);
   gtk_grid_attach(GTK_GRID(sliders),attenuation_scale,7,0,2,1);
   g_signal_connect(G_OBJECT(attenuation_scale),"value_changed",G_CALLBACK(attenuation_value_changed_cb),NULL);
 
   c25_att_preamp_label = gtk_label_new("Att/PreAmp");
-  //gtk_widget_override_font(c25_att_preamp_label, pango_font_description_from_string("Sans 11"));
+  gtk_widget_override_font(c25_att_preamp_label, pango_font_description_from_string("Sans 10"));
   gtk_grid_attach(GTK_GRID(sliders), c25_att_preamp_label, 6, 0, 1, 1);
 
   c25_att_combobox = gtk_combo_box_text_new();
-  //gtk_widget_override_font(c25_att_combobox, pango_font_description_from_string("Sans 10"));
+  gtk_widget_override_font(c25_att_combobox, pango_font_description_from_string("Sans 10"));
   gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_att_combobox), "0", "0 dB");
   gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_att_combobox), "1", "-12 dB");
   gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_att_combobox), "2", "-24 dB");
@@ -748,7 +748,7 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height);
   g_signal_connect(G_OBJECT(c25_att_combobox), "changed", G_CALLBACK(c25_att_combobox_changed), NULL);
 
   c25_preamp_combobox = gtk_combo_box_text_new();
-  //gtk_widget_override_font(c25_preamp_combobox, pango_font_description_from_string("Sans 10"));
+  gtk_widget_override_font(c25_preamp_combobox, pango_font_description_from_string("Sans 10"));
   gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_preamp_combobox), "0", "0 dB");
   gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_preamp_combobox), "1", "18 dB");
   gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_preamp_combobox), "2", "36 dB");
@@ -760,21 +760,21 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height);
   if(can_transmit) {
 
     mic_gain_label=gtk_label_new(mic_linein?"Linein:":"Mic (dB):");
-    //gtk_widget_override_font(mic_gain_label, pango_font_description_from_string("Sans 11"));
+    gtk_widget_override_font(mic_gain_label, pango_font_description_from_string("Sans 10"));
     gtk_grid_attach(GTK_GRID(sliders),mic_gain_label,0,1,1,1);
 
     mic_gain_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,mic_linein?0.0:-10.0,mic_linein?31.0:50.0, 1.0);
-    //gtk_widget_override_font(mic_gain_scale, pango_font_description_from_string("Sans 10"));
+    gtk_widget_override_font(mic_gain_scale, pango_font_description_from_string("Sans 10"));
     gtk_range_set_value (GTK_RANGE(mic_gain_scale),mic_linein?linein_gain:mic_gain);
     gtk_grid_attach(GTK_GRID(sliders),mic_gain_scale,1,1,2,1);
     g_signal_connect(G_OBJECT(mic_gain_scale),"value_changed",G_CALLBACK(micgain_value_changed_cb),NULL);
 
     drive_label=gtk_label_new("Drive:");
-    //gtk_widget_override_font(drive_label, pango_font_description_from_string("Sans 11"));
+    gtk_widget_override_font(drive_label, pango_font_description_from_string("Sans 10"));
     gtk_grid_attach(GTK_GRID(sliders),drive_label,3,1,1,1);
   
     drive_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.0);
-    //gtk_widget_override_font(drive_scale, pango_font_description_from_string("Sans 10"));
+    gtk_widget_override_font(drive_scale, pango_font_description_from_string("Sans 10"));
     gtk_range_set_value (GTK_RANGE(drive_scale),getDrive());
     gtk_widget_show(drive_scale);
     gtk_grid_attach(GTK_GRID(sliders),drive_scale,4,1,2,1);
@@ -783,12 +783,12 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height);
 
 #ifndef COMPRESSION_SLIDER_INSTEAD_OF_SQUELCH
   squelch_label=gtk_label_new("Squelch:");
-  //gtk_widget_override_font(squelch_label, pango_font_description_from_string("Sans 11"));
+  gtk_widget_override_font(squelch_label, pango_font_description_from_string("Sans 10"));
   gtk_widget_show(squelch_label);
   gtk_grid_attach(GTK_GRID(sliders),squelch_label,6,1,1,1);
 
   squelch_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.0);
-  //gtk_widget_override_font(squelch_scale, pango_font_description_from_string("Sans 10"));
+  gtk_widget_override_font(squelch_scale, pango_font_description_from_string("Sans 10"));
   gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch);
   gtk_widget_show(squelch_scale);
   gtk_grid_attach(GTK_GRID(sliders),squelch_scale,7,1,2,1);
@@ -802,12 +802,12 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height);
 #else
   if(can_transmit) {
     comp_label=gtk_label_new("COMP:");
-    //gtk_widget_override_font(comp_label, pango_font_description_from_string("Sans 11"));
+    gtk_widget_override_font(comp_label, pango_font_description_from_string("Sans 10"));
     gtk_widget_show(comp_label);
     gtk_grid_attach(GTK_GRID(sliders),comp_label,6,1,1,1);
 
     comp_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 20.0, 1.0);
-    //gtk_widget_override_font(comp_scale, pango_font_description_from_string("Sans 10"));
+    gtk_widget_override_font(comp_scale, pango_font_description_from_string("Sans 10"));
     gtk_range_set_value (GTK_RANGE(comp_scale),transmitter->compressor_level);
     gtk_widget_show(comp_scale);
     gtk_grid_attach(GTK_GRID(sliders),comp_scale,7,1,2,1);