app: move the GIMP_CURSOR_SIZE define to a single place in the right header

This commit is contained in:
Michael Natterer
2010-08-26 19:13:49 +02:00
parent fa6eb03fb2
commit d745ab3871
3 changed files with 24 additions and 24 deletions

View File

@ -141,17 +141,15 @@ gimp_display_shell_update_cursor (GimpDisplayShell *shell,
/* Erase old cursor, if necessary */
#define CURSOR_SIZE 14
if (shell->have_cursor && (! new_cursor ||
display_x != shell->cursor_x ||
display_y != shell->cursor_y))
{
gimp_display_shell_expose_area (shell,
shell->cursor_x - CURSOR_SIZE,
shell->cursor_y - CURSOR_SIZE,
2 * CURSOR_SIZE + 1,
2 * CURSOR_SIZE + 1);
shell->cursor_x - GIMP_CURSOR_SIZE,
shell->cursor_y - GIMP_CURSOR_SIZE,
2 * GIMP_CURSOR_SIZE + 1,
2 * GIMP_CURSOR_SIZE + 1);
}
shell->have_cursor = new_cursor;
@ -161,10 +159,10 @@ gimp_display_shell_update_cursor (GimpDisplayShell *shell,
if (shell->have_cursor)
{
gimp_display_shell_expose_area (shell,
shell->cursor_x - CURSOR_SIZE,
shell->cursor_y - CURSOR_SIZE,
2 * CURSOR_SIZE + 1,
2 * CURSOR_SIZE + 1);
shell->cursor_x - GIMP_CURSOR_SIZE,
shell->cursor_y - GIMP_CURSOR_SIZE,
2 * GIMP_CURSOR_SIZE + 1,
2 * GIMP_CURSOR_SIZE + 1);
}
/* use the passed image_coords for the statusbar because they are

View File

@ -19,6 +19,9 @@
#define __GIMP_DISPLAY_SHELL_CURSOR_H__
#define GIMP_CURSOR_SIZE 7
void gimp_display_shell_set_cursor (GimpDisplayShell *shell,
GimpCursorType cursor_type,
GimpToolCursorType tool_cursor,

View File

@ -49,6 +49,7 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-cursor.h"
#include "gimpdisplayshell-draw.h"
#include "gimpdisplayshell-render.h"
#include "gimpdisplayshell-scale.h"
@ -707,31 +708,29 @@ gimp_display_shell_draw_cursor (GimpDisplayShell *shell,
gimp_display_shell_set_cursor_style (shell, cr);
cairo_translate (cr, 0.5, 0.5);
#define CURSOR_SIZE 14
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
cairo_move_to (cr, shell->cursor_x - CURSOR_SIZE, shell->cursor_y - 1);
cairo_line_to (cr, shell->cursor_x + CURSOR_SIZE, shell->cursor_y - 1);
cairo_move_to (cr, shell->cursor_x - GIMP_CURSOR_SIZE, shell->cursor_y - 1);
cairo_line_to (cr, shell->cursor_x + GIMP_CURSOR_SIZE, shell->cursor_y - 1);
cairo_move_to (cr, shell->cursor_x - CURSOR_SIZE, shell->cursor_y + 1);
cairo_line_to (cr, shell->cursor_x + CURSOR_SIZE, shell->cursor_y + 1);
cairo_move_to (cr, shell->cursor_x - GIMP_CURSOR_SIZE, shell->cursor_y + 1);
cairo_line_to (cr, shell->cursor_x + GIMP_CURSOR_SIZE, shell->cursor_y + 1);
cairo_move_to (cr, shell->cursor_x - 1, shell->cursor_y - CURSOR_SIZE);
cairo_line_to (cr, shell->cursor_x - 1, shell->cursor_y + CURSOR_SIZE);
cairo_move_to (cr, shell->cursor_x - 1, shell->cursor_y - GIMP_CURSOR_SIZE);
cairo_line_to (cr, shell->cursor_x - 1, shell->cursor_y + GIMP_CURSOR_SIZE);
cairo_move_to (cr, shell->cursor_x + 1, shell->cursor_y - CURSOR_SIZE);
cairo_line_to (cr, shell->cursor_x + 1, shell->cursor_y + CURSOR_SIZE);
cairo_move_to (cr, shell->cursor_x + 1, shell->cursor_y - GIMP_CURSOR_SIZE);
cairo_line_to (cr, shell->cursor_x + 1, shell->cursor_y + GIMP_CURSOR_SIZE);
cairo_stroke (cr);
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_move_to (cr, shell->cursor_x - CURSOR_SIZE, shell->cursor_y);
cairo_line_to (cr, shell->cursor_x + CURSOR_SIZE, shell->cursor_y);
cairo_move_to (cr, shell->cursor_x - GIMP_CURSOR_SIZE, shell->cursor_y);
cairo_line_to (cr, shell->cursor_x + GIMP_CURSOR_SIZE, shell->cursor_y);
cairo_move_to (cr, shell->cursor_x, shell->cursor_y - CURSOR_SIZE);
cairo_line_to (cr, shell->cursor_x, shell->cursor_y + CURSOR_SIZE);
cairo_move_to (cr, shell->cursor_x, shell->cursor_y - GIMP_CURSOR_SIZE);
cairo_line_to (cr, shell->cursor_x, shell->cursor_y + GIMP_CURSOR_SIZE);
cairo_stroke (cr);
}