1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Gabriele
f3356a3f36 Merge branch 'gabrybarbe-setting-tab-toolbox' into 'master'
Teams/GIMP/Design/gimp-ux#666: add option to enable/disable TAB key to show/hide toolbox

Closes Teams/GIMP/Design/gimp-ux#666

See merge request GNOME/gimp!2490
2025-10-05 20:14:58 +02:00
Gabriele Barbero
10256cbdab display: add option to enable/disable TAB key to show/hide toolbox
This commit introduces a new preference option that allows users to enable
or disable the functionality of using the TAB key to show or hide the toolbox in GIMP.
The settings is TRUE by default, preserving the existing behavior.
2025-10-05 11:09:31 +02:00
4 changed files with 25 additions and 2 deletions

View File

@@ -295,6 +295,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_TOOLBOX_GROUPS,
"toolbox-show-hide",
"Use TAB to show/hide the toolbox",
TOOLBOX_SHOW_HIDE,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
path = gimp_config_build_data_path ("themes");
GIMP_CONFIG_PROP_PATH (object_class, PROP_THEME_PATH,
"theme-path",

View File

@@ -750,6 +750,9 @@ _("Show the currently selected brush, pattern and gradient in the toolbox.")
#define TOOLBOX_GROUPS_BLURB \
_("Use a single toolbox button for grouped tools.")
#define TOOLBOX_SHOW_HIDE \
_("Use the TAB key to show and hide the toolbox.")
#define TOOLBOX_IMAGE_AREA_BLURB \
_("Show the currently active image in the toolbox.")

View File

@@ -2295,6 +2295,10 @@ prefs_dialog_new (Gimp *gimp,
_("Use tool _groups"),
NULL,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "toolbox-show-hide",
_("Use _TAB to show/hide the toolbox"),
NULL,
GTK_BOX (vbox2), size_group);
g_clear_object (&size_group);

View File

@@ -30,6 +30,7 @@
#include "tools/tools-types.h"
#include "config/gimpdisplayconfig.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimp-filter-history.h"
@@ -2160,8 +2161,16 @@ gimp_display_shell_tab_pressed (GimpDisplayShell *shell,
}
else
{
gimp_ui_manager_activate_action (manager, "windows",
"windows-hide-docks");
GimpGuiConfig *config = GIMP_GUI_CONFIG (shell->display->gimp->config);
gboolean enable_tab;
g_object_get (config,
"toolbox-show-hide", &enable_tab,
NULL);
if (enable_tab)
gimp_ui_manager_activate_action (manager, "windows",
"windows-hide-docks");
return TRUE;
}