From ef43c29ded82cd243d6a84bede1dd36825f21e02 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 --- ChangeLog | 3 +++ src/PedView.py | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 58131521f..0daa63e97 100644 --- a/ChangeLog +++ b/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/src/PedView.py b/src/PedView.py index 0555def89..2ee2157cb 100644 --- a/src/PedView.py +++ b/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)