mirror of https://github.com/GNOME/gimp.git
simplified code for statusbar display.
2006-08-14 Sven Neumann <sven@gimp.org> * app/tools/gimprectangletool.c (gimp_rectangle_tool_motion): simplified code for statusbar display.
This commit is contained in:
parent
f47007d897
commit
36b4860e6d
|
@ -1,3 +1,8 @@
|
|||
2006-08-14 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
|
||||
simplified code for statusbar display.
|
||||
|
||||
2006-08-14 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimprectangletool.c: changed the limits for "pressx"
|
||||
|
|
|
@ -1365,30 +1365,26 @@ gimp_rectangle_tool_motion (GimpTool *tool,
|
|||
|
||||
gimp_rectangle_tool_update_options (rectangle, display);
|
||||
|
||||
if (function != RECT_MOVING &&
|
||||
function != RECT_EXECUTING)
|
||||
if (function != RECT_MOVING && function != RECT_EXECUTING)
|
||||
{
|
||||
gboolean constrain = gimp_rectangle_tool_get_constrain (rectangle);
|
||||
gint w, h;
|
||||
|
||||
gimp_tool_pop_status (tool, display);
|
||||
if (constrain)
|
||||
|
||||
if (gimp_rectangle_tool_get_constrain (rectangle))
|
||||
{
|
||||
gimp_tool_push_status_coords (tool, display,
|
||||
_("Rectangle: "),
|
||||
(rx2 > max_x ? max_x : rx2) -
|
||||
(rx1 < min_x ? min_x : rx1),
|
||||
" × ",
|
||||
(ry2 > max_y ? max_y : ry2) -
|
||||
(ry1 < min_y ? min_y : ry1));
|
||||
w = MIN (rx2, max_x) - MAX (rx1, min_x);
|
||||
h = MIN (ry2, max_y) - MAX (ry1, min_y);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_tool_push_status_coords (tool, display,
|
||||
_("Rectangle: "),
|
||||
rx2 - rx1,
|
||||
" × ",
|
||||
ry2 - ry1);
|
||||
w = rx2 - rx1;
|
||||
h = ry2 - ry1;
|
||||
}
|
||||
|
||||
if (w > 0 && h > 0)
|
||||
gimp_tool_push_status_coords (tool, display,
|
||||
_("Rectangle: "), w, " × ", h);
|
||||
}
|
||||
|
||||
if (function == RECT_CREATING)
|
||||
|
|
Loading…
Reference in New Issue