[gnome-text-editor] preferences: make this easier to tweak



commit 60e69ea08afb36c0ba375eb1c9dd65260d0dcd31
Author: Christian Hergert <chergert redhat com>
Date:   Tue Nov 30 20:28:08 2021 -0800

    preferences: make this easier to tweak
    
    For now, 3 seems better.

 src/editor-preferences-dialog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/editor-preferences-dialog.c b/src/editor-preferences-dialog.c
index cf03b8a..ecd76b3 100644
--- a/src/editor-preferences-dialog.c
+++ b/src/editor-preferences-dialog.c
@@ -29,6 +29,8 @@
 #include "editor-window.h"
 #include "editor-utils-private.h"
 
+#define N_COLUMNS 3
+
 struct _EditorPreferencesDialog
 {
   AdwPreferencesWindow  parent_instance;
@@ -206,7 +208,7 @@ update_style_schemes (EditorPreferencesDialog *self)
           gtk_actionable_set_action_name (GTK_ACTIONABLE (preview), "app.style-scheme");
           gtk_actionable_set_action_target (GTK_ACTIONABLE (preview), "s", scheme_ids[i]);
           gtk_widget_set_hexpand (preview, TRUE);
-          gtk_grid_attach (self->scheme_group, preview, j % 4, j / 4, 1, 1);
+          gtk_grid_attach (self->scheme_group, preview, j % N_COLUMNS, j / N_COLUMNS, 1, 1);
 
           j++;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]