From b47335d753b3e27f61a815b906f958e656e6f83f Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 24 Feb 2008 20:50:44 +0000 Subject: [PATCH] Use #defined colour values. git-svn-id: http://svn.voria.com/code@1814 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp | 12 ++++++------ synfig-studio/trunk/src/gtkmm/renderer_ducks.h | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp b/synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp index 2cafb78..d5bc6ce 100644 --- a/synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp +++ b/synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp @@ -320,11 +320,11 @@ Renderer_Ducks::render_vfunc( if(solid_lines) { gc->set_line_attributes(3,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER); - gc->set_rgb_fg_color(Gdk::Color("#000000")); + gc->set_rgb_fg_color(DUCK_COLOR_CONNECT_OUTSIDE); gc->set_function(Gdk::COPY); drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1])); gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER); - gc->set_rgb_fg_color(Gdk::Color("#9fefef")); + gc->set_rgb_fg_color(DUCK_COLOR_CONNECT_INSIDE); drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1])); } else @@ -333,11 +333,11 @@ Renderer_Ducks::render_vfunc( // gc->set_function(Gdk::INVERT); // drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1])); gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER); - gc->set_rgb_fg_color(Gdk::Color("#000000")); + gc->set_rgb_fg_color(DUCK_COLOR_CONNECT_OUTSIDE); gc->set_function(Gdk::COPY); drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1])); gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER); - gc->set_rgb_fg_color(Gdk::Color("#9fefef")); + gc->set_rgb_fg_color(DUCK_COLOR_CONNECT_INSIDE); drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1])); } } @@ -409,14 +409,14 @@ Renderer_Ducks::render_vfunc( real_mag.convert(App::distance_system,get_work_area()->get_rend_desc()); layout->set_text(real_mag.get_string()); - gc->set_rgb_fg_color(Gdk::Color("#000000")); + gc->set_rgb_fg_color(DUCK_COLOR_WIDTH_TEXT_1); drawable->draw_layout( gc, round_to_int(point[0])+1+6, round_to_int(point[1])+1-8, layout ); - gc->set_rgb_fg_color(Gdk::Color("#FF00FF")); + gc->set_rgb_fg_color(DUCK_COLOR_WIDTH_TEXT_2); drawable->draw_layout( gc, round_to_int(point[0])+6, diff --git a/synfig-studio/trunk/src/gtkmm/renderer_ducks.h b/synfig-studio/trunk/src/gtkmm/renderer_ducks.h index fb245af..32a6efd 100644 --- a/synfig-studio/trunk/src/gtkmm/renderer_ducks.h +++ b/synfig-studio/trunk/src/gtkmm/renderer_ducks.h @@ -41,7 +41,6 @@ #define DUCK_COLOR_TANGENT_2 Gdk::Color("#ff0000") #define DUCK_COLOR_VERTEX Gdk::Color("#ff7f00") #define DUCK_COLOR_WIDTH Gdk::Color("#ff00ff") - #define DUCK_COLOR_OTHER Gdk::Color("#00ff00") #define DUCK_COLOR_OUTLINE Gdk::Color("#000000") // the outline around each duck @@ -54,6 +53,12 @@ #define DUCK_COLOR_SELECTED Gdk::Color("#ff0000") // the color of the box drawn when a valuenode is selected +#define DUCK_COLOR_CONNECT_INSIDE Gdk::Color("#9fefef") // the color of the inside of the line connecting a vertex duck to the tangent ducks +#define DUCK_COLOR_CONNECT_OUTSIDE Gdk::Color("#000000") // the color of the outside of the line connecting a vertex duck to the tangent ducks + +#define DUCK_COLOR_WIDTH_TEXT_1 Gdk::Color("#000000") // the color of the text's shadow when hovering over a width duck +#define DUCK_COLOR_WIDTH_TEXT_2 Gdk::Color("#ff00ff") // the color of the text when hovering over a width duck + /* === T Y P E D E F S ===================================================== */ /* === C L A S S E S & S T R U C T S ======================================= */ -- 2.7.4