From 586422eef0be09b8ab11e4dc1b6bfed2f3c30605 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Fri, 13 Jan 2006 16:41:42 +0000 Subject: [PATCH] * src/PedView.py: Use the same font as used in the gtk style svn: r5745 --- gramps2/ChangeLog | 3 +++ gramps2/src/PedView.py | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 58131521f..0daa63e97 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2006-01-13 Martin Hawlisch + * src/PedView.py: Use the same font as used in the gtk style + 2006-01-13 Richard Taylor * src/ObjectSelector/_ObjectSelectorWindow.py: layout improvements * src/ObjectSelector/_PersonPreviewFrame.py: layout improvements diff --git a/gramps2/src/PedView.py b/gramps2/src/PedView.py index 0555def89..2ee2157cb 100644 --- a/gramps2/src/PedView.py +++ b/gramps2/src/PedView.py @@ -148,6 +148,7 @@ class PersonBoxWidget_cairo( gtk.DrawingArea): def realize(self,widget): self.context = self.window.cairo_create() self.textlayout = self.context.create_layout() + self.textlayout.set_font_description(self.get_style().font_desc) self.textlayout.set_text(self.text) s = self.textlayout.get_pixel_size() xmin = s[0] + 12 @@ -210,6 +211,13 @@ class PersonBoxWidget_cairo( gtk.DrawingArea): self.context.set_source_rgb( 0,0,0) self.context.show_layout( self.textlayout) + # text extents + #self.context.set_source_rgba( 1,0,0,0.5) + #s = self.textlayout.get_pixel_size() + #self.context.set_line_width(1) + #self.context.rectangle(5.5,4.5,s[0]-1,s[1]-1) + #self.context.stroke() + #border if self.hightlight: self.context.set_line_width(5)