[gimp] Issue #5813: Hidden rulers in GIMP 2.99 still take the same place.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #5813: Hidden rulers in GIMP 2.99 still take the same place.
- Date: Sun, 29 Nov 2020 11:46:45 +0000 (UTC)
commit c85e4c8db4a11754e5bd36b78ce70c41423ac234
Author: Jehan <jehan girinstud io>
Date: Sun Nov 29 12:39:57 2020 +0100
Issue #5813: Hidden rulers in GIMP 2.99 still take the same place.
app/display/gimpdisplayshell-appearance.c | 2 ++
app/display/gimpimagewindow.c | 12 ++++++++++++
2 files changed, 14 insertions(+)
---
diff --git a/app/display/gimpdisplayshell-appearance.c b/app/display/gimpdisplayshell-appearance.c
index f3c6bf1bd6..958540d959 100644
--- a/app/display/gimpdisplayshell-appearance.c
+++ b/app/display/gimpdisplayshell-appearance.c
@@ -171,6 +171,8 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
gtk_widget_set_visible (shell->origin, show);
gtk_widget_set_visible (shell->hrule, show);
gtk_widget_set_visible (shell->vrule, show);
+ gtk_widget_set_visible (shell->quick_mask_button, show);
+ gtk_widget_set_visible (shell->zoom_button, show);
gimp_display_shell_set_action_active (shell, "view-show-rulers", show);
}
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index c0df5b276f..db32149bc0 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -1691,6 +1691,18 @@ gimp_image_window_keep_canvas_pos (GimpImageWindow *window)
G_CALLBACK (gimp_image_window_shell_size_allocate),
data, (GClosureNotify) g_free,
G_CONNECT_AFTER);
+ /*
+ * XXX Asking a resize should not be necessary and should happen
+ * automatically with the translate coordinates. And it does, but
+ * sometimes only after some further event (like clicking on shell
+ * widgets). Until such event happens, the shell look broken, for
+ * instance with rulers and canvas overlapping and misaligned
+ * ruler values.
+ * So I queue a resize explicitly to force the correct shell
+ * visualization immediately.
+ * See also #5813.
+ */
+ gtk_widget_queue_resize (GTK_WIDGET (shell));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]