mirror of https://github.com/GNOME/gimp.git
app/display: introduce a style for dimming
This commit is contained in:
parent
eb5bb6363e
commit
dd1e858921
|
@ -811,7 +811,6 @@ gimp_display_shell_draw_highlight (GimpDisplayShell *shell,
|
|||
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
|
||||
cairo_clip (cr);
|
||||
|
||||
/* FIXME: make this configurable or at least use gimpdisplayshell-style.c */
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 0.5);
|
||||
gimp_display_shell_set_dim_style (shell, cr);
|
||||
cairo_paint (cr);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
@ -69,6 +67,8 @@ static const GimpRGB vectors_normal_fg = { 0.0, 0.0, 1.0, 0.8 };
|
|||
static const GimpRGB vectors_active_bg = { 1.0, 1.0, 1.0, 0.6 };
|
||||
static const GimpRGB vectors_active_fg = { 1.0, 0.0, 0.0, 0.8 };
|
||||
|
||||
static const GimpRGB dim = { 0.0, 0.0, 0.0, 0.5 };
|
||||
|
||||
static const GimpRGB tool_bg = { 0.0, 0.0, 0.0, 0.4 };
|
||||
static const GimpRGB tool_fg = { 1.0, 1.0, 1.0, 0.8 };
|
||||
static const GimpRGB tool_fg_highlight = { 1.0, 0.8, 0.2, 0.8 };
|
||||
|
@ -323,6 +323,16 @@ gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
|
|||
gimp_cairo_set_source_rgba (cr, &vectors_normal_fg);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_dim_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
gimp_cairo_set_source_rgba (cr, &dim);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
|
@ -341,7 +351,6 @@ gimp_display_shell_set_tool_fg_style (GimpDisplayShell *shell,
|
|||
cairo_t *cr,
|
||||
gboolean highlight)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
|
|
@ -54,6 +54,10 @@ void gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
|
|||
cairo_t *cr,
|
||||
gdouble width,
|
||||
gboolean active);
|
||||
|
||||
void gimp_display_shell_set_dim_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
|
||||
void gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void gimp_display_shell_set_tool_fg_style (GimpDisplayShell *shell,
|
||||
|
|
Loading…
Reference in New Issue