mirror of https://github.com/GNOME/gimp.git
app: improve drawing of sample points so they are always visible
Draw them a bit brighter and larger, and with a dark shadow like tool lines so they are visible on all backgrounds.
This commit is contained in:
parent
f2a1fd5bf0
commit
01e5a6b133
|
@ -36,7 +36,7 @@
|
|||
|
||||
/* Styles for common and custom guides. */
|
||||
static const GimpRGB guide_normal_fg = { 0.0, 0.0, 0.0, 1.0 };
|
||||
static const GimpRGB guide_normal_bg = { 0.0, 0.5, 1.0, 1.0 };
|
||||
static const GimpRGB guide_normal_bg = { 0.0, 0.8, 1.0, 1.0 };
|
||||
static const GimpRGB guide_active_fg = { 0.0, 0.0, 0.0, 1.0 };
|
||||
static const GimpRGB guide_active_bg = { 1.0, 0.0, 0.0, 1.0 };
|
||||
|
||||
|
@ -56,7 +56,7 @@ static const GimpRGB guide_split_active_fg = { 1.0, 0.0, 1.0, 1.0 };
|
|||
static const GimpRGB guide_split_active_bg = { 1.0, 0.0, 0.0, 1.0 };
|
||||
|
||||
/* Styles for other canvas items. */
|
||||
static const GimpRGB sample_point_normal = { 0.0, 0.5, 1.0, 1.0 };
|
||||
static const GimpRGB sample_point_normal = { 0.0, 0.8, 1.0, 1.0 };
|
||||
static const GimpRGB sample_point_active = { 1.0, 0.0, 0.0, 1.0 };
|
||||
|
||||
static const GimpRGB layer_fg = { 0.0, 0.0, 0.0, 1.0 };
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "gimpdisplayshell.h"
|
||||
|
||||
|
||||
#define GIMP_SAMPLE_POINT_DRAW_SIZE 10
|
||||
#define GIMP_SAMPLE_POINT_DRAW_SIZE 14
|
||||
|
||||
|
||||
enum
|
||||
|
@ -245,10 +245,10 @@ gimp_canvas_sample_point_draw (GimpCanvasItem *item,
|
|||
layout = gimp_canvas_get_layout (GIMP_CANVAS (canvas),
|
||||
"%d", private->index);
|
||||
|
||||
cairo_move_to (cr, x + 2.5, y + 2.5);
|
||||
cairo_move_to (cr, x + 3, y + 3);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
_gimp_canvas_item_fill (item, cr);
|
||||
_gimp_canvas_item_stroke (item, cr);
|
||||
}
|
||||
|
||||
static cairo_region_t *
|
||||
|
@ -274,8 +274,8 @@ gimp_canvas_sample_point_get_extents (GimpCanvasItem *item)
|
|||
|
||||
pango_layout_get_extents (layout, &ink, NULL);
|
||||
|
||||
x2 = MAX (x2, 2.5 + ink.width);
|
||||
y2 = MAX (y2, 2.5 + ink.height);
|
||||
x2 = MAX (x2, 3 + ink.width);
|
||||
y2 = MAX (y2, 3 + ink.height);
|
||||
|
||||
rectangle.x = x1 - 1.5;
|
||||
rectangle.y = y1 - 1.5;
|
||||
|
@ -293,6 +293,9 @@ gimp_canvas_sample_point_stroke (GimpCanvasItem *item,
|
|||
|
||||
if (private->sample_point_style)
|
||||
{
|
||||
gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr);
|
||||
cairo_stroke_preserve (cr);
|
||||
|
||||
gimp_canvas_set_sample_point_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
gimp_canvas_item_get_highlight (item));
|
||||
cairo_stroke (cr);
|
||||
|
|
Loading…
Reference in New Issue