summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFelipe Corr??a da Silva Sanches <juca@members.fsf.org>2008-07-12 13:24:51 +0000
committerJucaBlues <JucaBlues@users.sourceforge.net>2008-07-12 13:24:51 +0000
commit0e851751dcbceea3bac3f8e4d7b54f297db14f27 (patch)
tree98a2c253488b90494aaabd13b9b0274d15380c25 /src
parentproperly update kerning value in the spinbox and fix some crashes (diff)
downloadinkscape-0e851751dcbceea3bac3f8e4d7b54f297db14f27.tar.gz
inkscape-0e851751dcbceea3bac3f8e4d7b54f297db14f27.zip
increase font size on kerning_preview and text_preview drawing areas
(bzr r6271)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp14
-rw-r--r--src/ui/dialog/svg-fonts-dialog.h2
2 files changed, 13 insertions, 3 deletions
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 254929bdb..b5489e31a 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -21,7 +21,6 @@
SvgFontDrawingArea::SvgFontDrawingArea(){
this->text = "";
this->svgfont = NULL;
- ((Gtk::Widget*) this)->set_size_request(150, 50);
}
void SvgFontDrawingArea::set_svgfont(SvgFont* svgfont){
@@ -32,6 +31,12 @@ void SvgFontDrawingArea::set_text(Glib::ustring text){
this->text = text;
}
+void SvgFontDrawingArea::set_size(int x, int y){
+ this->x = x;
+ this->y = y;
+ ((Gtk::Widget*) this)->set_size_request(x, y);
+}
+
void SvgFontDrawingArea::redraw(){
((Gtk::Widget*) this)->queue_draw();
}
@@ -41,8 +46,8 @@ bool SvgFontDrawingArea::on_expose_event (GdkEventExpose *event){
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(this->svgfont->get_font_face(), false /* does not have reference */)) );
- cr->set_font_size (20);
- cr->move_to (20, 20);
+ cr->set_font_size (this->y);
+ cr->move_to (10, 10);
cr->show_text (this->text.c_str());
}
return TRUE;
@@ -188,6 +193,9 @@ SvgFontsDialog::SvgFontsDialog()
kernvbox->add((Gtk::Widget&) kerning_preview);
kernvbox->add(kerning_spin);
+ kerning_preview.set_size(300, 150);
+ _font_da.set_size(150, 50);
+
//Text Preview:
_preview_entry.signal_changed().connect(sigc::mem_fun(*this, &SvgFontsDialog::on_preview_text_changed));
_getContents()->add(*Gtk::manage(new Gtk::Label("Preview Text:")));
diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h
index 837fc0478..24da11f10 100644
--- a/src/ui/dialog/svg-fonts-dialog.h
+++ b/src/ui/dialog/svg-fonts-dialog.h
@@ -32,8 +32,10 @@ public:
SvgFontDrawingArea();
void set_text(Glib::ustring);
void set_svgfont(SvgFont*);
+ void set_size(int x, int y);
void redraw();
private:
+ int x,y;
SvgFont* svgfont;
Glib::ustring text;
bool on_expose_event (GdkEventExpose *event);