[gimp/wip/Jehan/issue-498-quick-brush-edit: 516/523] app: new "Canvas Interaction" setting.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/issue-498-quick-brush-edit: 516/523] app: new "Canvas Interaction" setting.
- Date: Thu, 11 Aug 2022 17:06:27 +0000 (UTC)
commit 0ea6638d5da1c4650823e87360dca57589163273
Author: Jehan <jehan girinstud io>
Date: Mon Apr 4 19:20:20 2022 +0200
app: new "Canvas Interaction" setting.
Moving the "Space Bar", the "Snapping" and the new "Zoom" (MR !570)
settings there. The idea is that it will also be where we'll customize
more on-canvas related abilities, such as the new zooming behavior
preferences, but also possibility to customizing or disabling the
various canvas action, and finally customizing the new contextual
settings such as brush sizing or other.
app/dialogs/preferences-dialog.c | 123 ++++++++++++++++++++++-----------------
app/widgets/gimphelp-ids.h | 1 +
2 files changed, 71 insertions(+), 53 deletions(-)
---
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index 35a6f7e552..e8b3501f2c 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -2936,6 +2936,76 @@ prefs_dialog_new (Gimp *gimp,
g_object_set_data (G_OBJECT (button), "clear-button", button2);
+ /************************/
+ /* Canvas Interaction */
+ /************************/
+ vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
+ "gimp-prefs-image-windows",
+ _("Canvas Interaction"),
+ _("Canvas Interaction"),
+ GIMP_HELP_PREFS_CANVAS_INTERACTION,
+ NULL,
+ &top_iter);
+ gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
+
+ size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+
+ /* Space Bar */
+ vbox2 = prefs_frame_new (_("Space Bar"),
+ GTK_CONTAINER (vbox), FALSE);
+
+ grid = prefs_grid_new (GTK_CONTAINER (vbox2));
+
+ prefs_enum_combo_box_add (object, "space-bar-action", 0, 0,
+ _("_While space bar is pressed:"),
+ GTK_GRID (grid), 0, size_group);
+
+ /* Zoom by drag Behavior */
+ vbox2 = prefs_frame_new (_("Zoom"),
+ GTK_CONTAINER (vbox), FALSE);
+
+ grid = prefs_grid_new (GTK_CONTAINER (vbox2));
+
+ prefs_enum_combo_box_add (object, "drag-zoom-mode", 0, 0,
+ _("Dra_g-to-zoom behavior:"),
+ GTK_GRID (grid), 0, size_group);
+
+ grid = prefs_grid_new (GTK_CONTAINER (vbox2));
+
+ prefs_spin_button_add (object, "drag-zoom-speed", 5.0, 25.0, 0,
+ _("Drag-to-zoom spe_ed:"),
+ GTK_GRID (grid), 0, size_group);
+
+ /***********************************/
+ /* Canvas Interaction / Snapping */
+ /***********************************/
+ vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
+ "gimp-prefs-image-windows-snapping",
+ _("Snapping Behavior"),
+ _("Snapping"),
+ GIMP_HELP_PREFS_IMAGE_WINDOW_SNAPPING,
+ &top_iter,
+ &child_iter);
+
+ prefs_behavior_options_frame_add (gimp,
+ G_OBJECT (display_config->default_view),
+ _("Default Behavior in Normal Mode"),
+ GTK_CONTAINER (vbox));
+ prefs_behavior_options_frame_add (gimp,
+ G_OBJECT (display_config->default_fullscreen_view),
+ _("Default Behavior in Fullscreen Mode"),
+ GTK_CONTAINER (vbox));
+
+ /* Snapping Distance */
+ vbox2 = prefs_frame_new (_("General"),
+ GTK_CONTAINER (vbox), FALSE);
+ grid = prefs_grid_new (GTK_CONTAINER (vbox2));
+
+ prefs_spin_button_add (object, "snap-distance", 1.0, 5.0, 0,
+ _("_Snapping distance:"),
+ GTK_GRID (grid), 0, NULL);
+
+
/*******************/
/* Image Windows */
/*******************/
@@ -2986,29 +3056,6 @@ prefs_dialog_new (Gimp *gimp,
_("Initial zoom _ratio:"),
GTK_GRID (grid), 0, size_group);
- grid = prefs_grid_new (GTK_CONTAINER (vbox2));
-
- prefs_enum_combo_box_add (object, "drag-zoom-mode", 0, 0,
- _("Dra_g-to-zoom behavior:"),
- GTK_GRID (grid), 0, size_group);
-
- grid = prefs_grid_new (GTK_CONTAINER (vbox2));
-
- prefs_spin_button_add (object, "drag-zoom-speed", 5.0, 25.0, 0,
- _("Drag-to-zoom spe_ed:"),
- GTK_GRID (grid), 0, size_group);
-
- /* Space Bar */
- vbox2 = prefs_frame_new (_("Space Bar"),
- GTK_CONTAINER (vbox), FALSE);
-
- grid = prefs_grid_new (GTK_CONTAINER (vbox2));
-
- prefs_enum_combo_box_add (object, "space-bar-action", 0, 0,
- _("_While space bar is pressed:"),
- GTK_GRID (grid), 0, size_group);
-
-
/********************************/
/* Image Windows / Appearance */
/********************************/
@@ -3166,36 +3213,6 @@ prefs_dialog_new (Gimp *gimp,
}
- /******************************/
- /* Image Windows / Snapping */
- /******************************/
- vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
- "gimp-prefs-image-windows-snapping",
- _("Image Window Snapping Behavior"),
- _("Snapping"),
- GIMP_HELP_PREFS_IMAGE_WINDOW_SNAPPING,
- &top_iter,
- &child_iter);
-
- prefs_behavior_options_frame_add (gimp,
- G_OBJECT (display_config->default_view),
- _("Default Behavior in Normal Mode"),
- GTK_CONTAINER (vbox));
- prefs_behavior_options_frame_add (gimp,
- G_OBJECT (display_config->default_fullscreen_view),
- _("Default Behavior in Fullscreen Mode"),
- GTK_CONTAINER (vbox));
-
- /* Snapping Distance */
- vbox2 = prefs_frame_new (_("General"),
- GTK_CONTAINER (vbox), FALSE);
- grid = prefs_grid_new (GTK_CONTAINER (vbox2));
-
- prefs_spin_button_add (object, "snap-distance", 1.0, 5.0, 0,
- _("_Snapping distance:"),
- GTK_GRID (grid), 0, NULL);
-
-
/*******************/
/* Input Devices */
/*******************/
diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h
index b860782bd0..24a6845157 100644
--- a/app/widgets/gimphelp-ids.h
+++ b/app/widgets/gimphelp-ids.h
@@ -645,6 +645,7 @@
#define GIMP_HELP_PREFS_HELP "gimp-prefs-help"
#define GIMP_HELP_PREFS_DISPLAY "gimp-prefs-display"
#define GIMP_HELP_PREFS_WINDOW_MANAGEMENT "gimp-prefs-window-management"
+#define GIMP_HELP_PREFS_CANVAS_INTERACTION "gimp-prefs-canvas-interaction"
#define GIMP_HELP_PREFS_IMAGE_WINDOW "gimp-prefs-image-window"
#define GIMP_HELP_PREFS_IMAGE_WINDOW_APPEARANCE "gimp-prefs-image-window-appearance"
#define GIMP_HELP_PREFS_IMAGE_WINDOW_TITLE "gimp-prefs-image-window-title"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]