From: dooglus Date: Tue, 25 Sep 2007 21:56:58 +0000 (+0000) Subject: Fix 1801220: Some Ubuntu Themes don't show the red border in animate edit mode. ... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=65fb935293f8601f3042482dddc35a21eaa46d87;p=synfig.git Fix 1801220: Some Ubuntu Themes don't show the red border in animate edit mode. Draw the border by hand rather than relying on the Gtk theme to have left a pixel or two of background showing. git-svn-id: http://svn.voria.com/code@758 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/workarea.cpp b/synfig-studio/trunk/src/gtkmm/workarea.cpp index 661774f..a6ca612 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.cpp +++ b/synfig-studio/trunk/src/gtkmm/workarea.cpp @@ -2067,17 +2067,22 @@ WorkArea::refresh(GdkEventExpose*event) // If we are in animate mode, draw a red border around the screen if(canvas_interface->get_mode()&synfigapp::MODE_ANIMATE) { - /*gc->set_rgb_fg_color(Gdk::Color("#FF0000")); +#ifdef USE_FRAME_BACKGROUND_TO_SHOW_EDIT_MODE + // This method of drawing the red border doesn't work on any + // Gtk theme which uses the crux-engine, hcengine, industrial, + // mist, or ubuntulooks engine, such as the default ubuntu + // 'Human' theme. + drawing_frame->modify_bg(Gtk::STATE_NORMAL,Gdk::Color("#FF0000")); +#else + // So let's do it in a more primitive fashion. + gc->set_rgb_fg_color(Gdk::Color("#FF0000")); gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER); drawing_area->get_window()->draw_rectangle( gc, false, // Fill? 0,0, // x,y - drawing_area->get_width()-1,drawing_area->get_height()-1 //w,h - ); - */ - drawing_frame->modify_bg(Gtk::STATE_NORMAL,Gdk::Color("#FF0000")); - //get_window()->set_background(Gdk::Color("#FF0000")); + drawing_area->get_width()-1,drawing_area->get_height()-1); // w,h +#endif } else drawing_frame->unset_bg(Gtk::STATE_NORMAL);