[gimp] app: always show the tool progress in the center of the canvas
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: always show the tool progress in the center of the canvas
- Date: Thu, 25 Apr 2013 07:42:45 +0000 (UTC)
commit 325d7541c771419cdd37f54838079a53ecdd9cc7
Author: Michael Natterer <mitch gimp org>
Date: Thu Apr 25 09:41:21 2013 +0200
app: always show the tool progress in the center of the canvas
getting rid of one more untransform_viewport().
app/tools/gimptool-progress.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimptool-progress.c b/app/tools/gimptool-progress.c
index a3e8a81..1f2a136 100644
--- a/app/tools/gimptool-progress.c
+++ b/app/tools/gimptool-progress.c
@@ -84,18 +84,21 @@ gimp_tool_progress_start (GimpProgress *progress,
{
GimpTool *tool = GIMP_TOOL (progress);
GimpDisplayShell *shell;
- gint x, y, w, h;
+ gint x, y;
g_return_val_if_fail (GIMP_IS_DISPLAY (tool->display), NULL);
g_return_val_if_fail (tool->progress == NULL, NULL);
shell = gimp_display_get_shell (tool->display);
- gimp_display_shell_untransform_viewport (shell, &x, &y, &w, &h);
+ x = shell->disp_width / 2;
+ y = shell->disp_height / 2;
+
+ gimp_display_shell_unzoom_xy (shell, x, y, &x, &y, FALSE);
tool->progress = gimp_canvas_progress_new (shell,
GIMP_HANDLE_ANCHOR_CENTER,
- x + w / 2, y + h / 2);
+ x, y);
gimp_display_shell_add_unrotated_item (shell, tool->progress);
g_object_unref (tool->progress);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]