Commit dd1e8589 authored by Sven Neumann's avatar Sven Neumann
Browse files

app/display: introduce a style for dimming

parent eb5bb636
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment