summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/svg-fonts-dialog.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2017-07-09 23:25:02 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2017-07-09 23:25:02 +0000
commitc46bbd6086708bc050871def16515838adfc4e44 (patch)
treef05cff18c427c9067e660c5ed52642e0a8afdd01 /src/ui/dialog/svg-fonts-dialog.cpp
parentGet rid of obsolete rules_hint in TreeView (diff)
downloadinkscape-c46bbd6086708bc050871def16515838adfc4e44.tar.gz
inkscape-c46bbd6086708bc050871def16515838adfc4e44.zip
SVGFountDrawingArea: handle draw signal
Diffstat (limited to 'src/ui/dialog/svg-fonts-dialog.cpp')
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 791677807..5284940be 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -66,10 +66,8 @@ void SvgFontDrawingArea::redraw(){
((Gtk::Widget*) this)->queue_draw();
}
-bool SvgFontDrawingArea::on_expose_event (GdkEventExpose */*event*/){
+bool SvgFontDrawingArea::on_draw(const Cairo::RefPtr<Cairo::Context> &cr) {
if (_svgfont){
- Glib::RefPtr<Gdk::Window> window = get_window();
- Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
cr->set_font_face( Cairo::RefPtr<Cairo::FontFace>(new Cairo::FontFace(_svgfont->get_font_face(), false /* does not have reference */)) );
cr->set_font_size (_y-20);
cr->move_to (10, 10);
@@ -84,7 +82,7 @@ bool SvgFontDrawingArea::on_expose_event (GdkEventExpose */*event*/){
cr->line_to (_x, _y-10);
cr->stroke();
}
- return TRUE;
+ return true;
}
namespace Inkscape {