> > I didn't review all the code changes in detail but tested it and works fine 
> > for me.
> > I wonder if we could make it visually more obvious that the directory and 
> > interval options belongs to the respective radio options. Maybe indenting 
> > them or wrap them in a `GtkFrame`?
> 
> i tried indenting blocks initially but rolled back because increase of 
> overall height for this tab increases height for all of them. Both 
> indentation and frame wrapping does not look ideal to me, but if we want we 
> may use one or another. I committed indentation for now

Sorry, I meant horizontal indendation.
Like this:
```diff
diff --git a/plugins/saveactions.c b/plugins/saveactions.c
index f20cafcad..8d441a88f 100644
--- a/plugins/saveactions.c
+++ b/plugins/saveactions.c
@@ -1457,7 +1463,6 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
                instantsave_radio = 
gtk_radio_button_new_with_mnemonic_from_widget(
                        GTK_RADIO_BUTTON(disabled_radio), _("Instant Save"));
                pref_widgets.untitled_document_save_instantsave_radio = 
instantsave_radio;
-               gtk_widget_set_margin_top(instantsave_radio, 8);
                gtk_label_set_mnemonic_widget(GTK_LABEL(label), 
instantsave_radio);
                gtk_button_set_focus_on_click(GTK_BUTTON(instantsave_radio), 
FALSE);
                
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(instantsave_radio), 
enable_instantsave);
@@ -1469,6 +1474,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
                        _("_Directory to save files in (leave empty to use the 
default: %s):"), g_get_tmp_dir());
                label = gtk_label_new_with_mnemonic(entry_dir_label_text);
                gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+               gtk_widget_set_margin_left(label, 12);
                gtk_box_pack_start(GTK_BOX(inner_vbox), label, FALSE, FALSE, 0);
                g_free(entry_dir_label_text);
 
@@ -1487,6 +1493,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
                hbox = gtk_hbox_new(FALSE, 6);
                gtk_box_pack_start(GTK_BOX(hbox), entry_dir, TRUE, TRUE, 0);
                gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+               gtk_widget_set_margin_left(hbox, 12);
                gtk_box_pack_start(GTK_BOX(inner_vbox), hbox, FALSE, FALSE, 0);
 
                help_label = gtk_label_new(
@@ -1495,6 +1502,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
                          "manually. The Instant Save plugin will not delete 
the created files.</i>"));
                gtk_label_set_use_markup(GTK_LABEL(help_label), TRUE);
                gtk_misc_set_alignment(GTK_MISC(help_label), 0, 0.5);
+               gtk_widget_set_margin_left(help_label, 12);
                gtk_widget_set_margin_bottom(help_label, 8);
                gtk_box_pack_start(GTK_BOX(inner_vbox), help_label, FALSE, 
FALSE, 0);
 
@@ -1503,7 +1511,6 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
                persistent_radio = 
gtk_radio_button_new_with_mnemonic_from_widget(
                        GTK_RADIO_BUTTON(disabled_radio), _("Persistent 
Untitled Documents"));
                pref_widgets.untitled_document_save_persistent_radio = 
persistent_radio;
-               gtk_widget_set_margin_top(persistent_radio, 8);
                gtk_label_set_mnemonic_widget(GTK_LABEL(label), 
persistent_radio);
                gtk_button_set_focus_on_click(GTK_BUTTON(persistent_radio), 
FALSE);
                
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(persistent_radio), 
enable_persistent_untitled_docs);
@@ -1513,6 +1520,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
 
                label = gtk_label_new_with_mnemonic(_("_Directory to save 
persistent untitled documents in:"));
         gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+               gtk_widget_set_margin_left(label, 12);
         gtk_box_pack_start(GTK_BOX(inner_vbox), label, FALSE, FALSE, 0);
 
         pref_widgets.persistent_untitled_docs_entry_dir = entry_dir = 
gtk_entry_new();
@@ -1531,6 +1539,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
         gtk_box_pack_start(GTK_BOX(hbox), entry_dir, TRUE, TRUE, 0);
         gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
 
+               gtk_widget_set_margin_left(hbox, 12);
         gtk_box_pack_start(GTK_BOX(inner_vbox), hbox, FALSE, FALSE, 0);
 
         hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
@@ -1538,6 +1547,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
         gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
         gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
 
+               gtk_widget_set_margin_left(hbox, 12);
         gtk_box_pack_start(GTK_BOX(inner_vbox), hbox, FALSE, FALSE, 5);
 
         hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
@@ -1550,13 +1560,14 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
         gtk_box_pack_start(GTK_BOX(hbox), spin, TRUE, TRUE, 0);
         gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
 
+               gtk_widget_set_margin_left(hbox, 12);
         gtk_box_pack_start(GTK_BOX(inner_vbox), hbox, FALSE, FALSE, 0);
 
                /* Common */
 
                label = gtk_label_new_with_mnemonic(_("Default _filetype to use 
for new files:"));
                gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-               gtk_widget_set_margin_top(label, 20);
+               gtk_widget_set_margin_top(label, 15);
                gtk_box_pack_start(GTK_BOX(inner_vbox), label, FALSE, FALSE, 0);
 
                pref_widgets.untitled_document_save_ft_combo = combo = 
gtk_combo_box_text_new();
```
This is reverting the vertical and adding horizontal indendation.

So the settings should visually better grouped to the according radio options.

![Screenshot_2024-11-20_11-04-14](https://github.com/user-attachments/assets/ed53a927-55e2-4572-b66d-8964c9179a75)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3911#issuecomment-2488139820
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3911/[email protected]>

Reply via email to