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

Compare commits

...

1 Commits

Author SHA1 Message Date
Alx Sa
eb585da826 config, gui: Restore "Show Tooltips" option in Preferences
In b3620517, we removed the option to hide or show
tooltips when hovering over an icon.
The rationale given in #1965 appears to be related to
the added complexity of the option. A suggestion
was given to hardcode the tooltips with an opacity of
0 in the CSS to resolve the issue.

This patch restores the option to toggle tooltips in the
Preferences Dialogue, but simply writes the suggested
CSS as part of themes.css rather than the original,
more complex implementation. This should hopefully
satisfy users who feel this change was a regression
from 2.10, while keeping the implementation simple.
2025-09-09 17:25:51 +00:00
4 changed files with 29 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ enum
PROP_RESTORE_SESSION,
PROP_RESTORE_MONITOR,
PROP_SAVE_TOOL_OPTIONS,
PROP_SHOW_TOOLTIPS,
PROP_CAN_CHANGE_ACCELS,
PROP_SAVE_ACCELS,
PROP_RESTORE_ACCELS,
@@ -215,6 +216,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SHOW_TOOLTIPS,
"show-tooltips",
"Show tooltips",
SHOW_TOOLTIPS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
/* XXX: this is now ignored and unsed because we were relying on
* "gtk-can-change-accels" property of GtkSettings which is deprecated and
* ignored since GTK+ 3.10.
@@ -662,6 +670,9 @@ gimp_gui_config_set_property (GObject *object,
case PROP_SAVE_TOOL_OPTIONS:
gui_config->save_tool_options = g_value_get_boolean (value);
break;
case PROP_SHOW_TOOLTIPS:
gui_config->show_tooltips = g_value_get_boolean (value);
break;
case PROP_CAN_CHANGE_ACCELS:
gui_config->can_change_accels = g_value_get_boolean (value);
break;
@@ -846,6 +857,9 @@ gimp_gui_config_get_property (GObject *object,
case PROP_SAVE_TOOL_OPTIONS:
g_value_set_boolean (value, gui_config->save_tool_options);
break;
case PROP_SHOW_TOOLTIPS:
g_value_set_boolean (value, gui_config->show_tooltips);
break;
case PROP_CAN_CHANGE_ACCELS:
g_value_set_boolean (value, gui_config->can_change_accels);
break;

View File

@@ -51,6 +51,7 @@ struct _GimpGuiConfig
gboolean restore_session;
gboolean restore_monitor;
gboolean save_tool_options;
gboolean show_tooltips;
gboolean save_accels;
gboolean restore_accels;
gint last_opened_size;

View File

@@ -2646,6 +2646,10 @@ prefs_dialog_new (Gimp *gimp,
/* General */
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "show-tooltips",
_("Show _tooltips"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "show-help-button",
_("Show help _buttons"),
GTK_BOX (vbox2));

View File

@@ -154,6 +154,9 @@ themes_init (Gimp *gimp)
g_signal_connect (config, "notify::font-relative-size",
G_CALLBACK (themes_theme_change_notify),
gimp);
g_signal_connect (config, "notify::show-tooltips",
G_CALLBACK (themes_theme_change_notify),
gimp);
themes_theme_change_notify (config, NULL, gimp);
@@ -704,6 +707,13 @@ themes_apply_theme (Gimp *gimp,
config->font_relative_size));
}
if (! error && ! config->show_tooltips)
{
g_output_stream_printf (output, NULL, NULL, &error,
"\n"
"tooltip { opacity: 0 }");
}
if (! error)
{
g_output_stream_printf (