[pitivi] GTK3 port: Pango extents fix
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] GTK3 port: Pango extents fix
- Date: Sun, 2 Sep 2012 03:59:54 +0000 (UTC)
commit 0266720fd58c6f7b3f1b6a069400fc150bb75ef2
Author: Matas Brazdeikis <matas brazdeikis lt>
Date: Thu Aug 2 18:17:28 2012 +0100
GTK3 port: Pango extents fix
pitivi/timeline/track.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index aa15d1d..1e8a15f 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -110,9 +110,11 @@ GlobalSettings.addConfigOption('clipFontColor',
def text_size(text):
- ink, logical = text.get_natural_extents()
- x1, y1, x2, y2 = [pango.PIXELS(x) for x in logical]
- return x2 - x1, y2 - y1
+ logical = pango.Rectangle()
+ tmp = pango.Rectangle()
+ text.get_natural_extents(tmp, logical)
+ pango.extents_to_pixels(logical, tmp)
+ return tmp.width, tmp.height
#--------------------------------------------------------------#
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]