when dropping a color on a text layer, change the text color. This is a
2004-02-11 Sven Neumann <sven@gimp.org> * app/display/gimpdisplayshell-dnd.c (gimp_display_shell_bucket_fill): when dropping a color on a text layer, change the text color. This is a quick hack; we should make filling a drawable a virtual method that can be overridden by the text layer.
This commit is contained in:

committed by
Sven Neumann

parent
b17955d2a1
commit
b9f19e30a9
@ -1,3 +1,11 @@
|
|||||||
|
2004-02-11 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-dnd.c
|
||||||
|
(gimp_display_shell_bucket_fill): when dropping a color on a text
|
||||||
|
layer, change the text color. This is a quick hack; we should make
|
||||||
|
filling a drawable a virtual method that can be overridden by the
|
||||||
|
text layer.
|
||||||
|
|
||||||
2004-02-11 Sven Neumann <sven@gimp.org>
|
2004-02-11 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* configure.in (GIMP_DESKTOP_ICON): fixed icon names.
|
* configure.in (GIMP_DESKTOP_ICON): fixed icon names.
|
||||||
|
@ -33,6 +33,9 @@
|
|||||||
#include "core/gimplayer.h"
|
#include "core/gimplayer.h"
|
||||||
#include "core/gimppattern.h"
|
#include "core/gimppattern.h"
|
||||||
|
|
||||||
|
#include "text/gimptext.h"
|
||||||
|
#include "text/gimptextlayer.h"
|
||||||
|
|
||||||
#include "vectors/gimpvectors.h"
|
#include "vectors/gimpvectors.h"
|
||||||
#include "vectors/gimpvectors-import.h"
|
#include "vectors/gimpvectors-import.h"
|
||||||
|
|
||||||
@ -166,6 +169,7 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell,
|
|||||||
{
|
{
|
||||||
GimpImage *gimage = shell->gdisp->gimage;
|
GimpImage *gimage = shell->gdisp->gimage;
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
|
GimpText *text;
|
||||||
|
|
||||||
if (gimage->gimp->busy)
|
if (gimage->gimp->busy)
|
||||||
return;
|
return;
|
||||||
@ -175,14 +179,27 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell,
|
|||||||
if (! drawable)
|
if (! drawable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gimp_drawable_bucket_fill_full (drawable,
|
/* FIXME: there should be a virtual method for this that the
|
||||||
fill_mode,
|
GimpTextLayer can override. */
|
||||||
GIMP_NORMAL_MODE, GIMP_OPACITY_OPAQUE,
|
|
||||||
FALSE /* no seed fill */,
|
|
||||||
FALSE, 0.0, FALSE, 0.0, 0.0 /* fill params */,
|
|
||||||
color, pattern);
|
|
||||||
|
|
||||||
gimp_image_flush (gimage);
|
if (GIMP_IS_TEXT_LAYER (drawable) &&
|
||||||
|
(text = gimp_text_layer_get_text (GIMP_TEXT_LAYER (drawable))) != NULL)
|
||||||
|
{
|
||||||
|
g_object_set (text, "color", color, NULL);
|
||||||
|
gimp_text_layer_flush (GIMP_TEXT_LAYER (drawable));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gimp_drawable_bucket_fill_full (drawable,
|
||||||
|
fill_mode,
|
||||||
|
GIMP_NORMAL_MODE, GIMP_OPACITY_OPAQUE,
|
||||||
|
FALSE, /* no seed fill */
|
||||||
|
FALSE, 0.0, FALSE, /* fill params */
|
||||||
|
0.0, 0.0, /* ignored */
|
||||||
|
color, pattern);
|
||||||
|
|
||||||
|
gimp_image_flush (gimage);
|
||||||
|
}
|
||||||
|
|
||||||
gimp_context_set_display (gimp_get_user_context (gimage->gimp),
|
gimp_context_set_display (gimp_get_user_context (gimage->gimp),
|
||||||
shell->gdisp);
|
shell->gdisp);
|
||||||
|
Reference in New Issue
Block a user