[pitivi] viewer: Redraw the current frame whenever the drawing area draws
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] viewer: Redraw the current frame whenever the drawing area draws
- Date: Wed, 24 Sep 2014 17:04:31 +0000 (UTC)
commit a0e64eff3a6b852096a6b6c29d7ad9fbbb7d36df
Author: Thibault Saunier <tsaunier gnome org>
Date: Tue Sep 9 23:07:31 2014 +0200
viewer: Redraw the current frame whenever the drawing area draws
Avoid artefacts when we resize the drawing area.
pitivi/viewer.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index dd16d0d..930dd59 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -810,6 +810,7 @@ class ViewerWidget(Gtk.AspectFrame, Loggable):
self.drawing_area = Gtk.DrawingArea()
self.drawing_area.set_double_buffered(False)
+ self.drawing_area.connect("draw", self._drawCb, None)
# We keep the ViewerWidget hidden initially, or the desktop wallpaper
# would show through the non-double-buffered widget!
if realizedCb:
@@ -832,6 +833,10 @@ class ViewerWidget(Gtk.AspectFrame, Loggable):
# for state in range(Gtk.StateType.INSENSITIVE + 1):
# self.modify_bg(state, self.style.black)
+ def _drawCb(self, unused, unused1, unused2):
+ if self.sink:
+ self.sink.expose()
+
def setDisplayAspectRatio(self, ratio):
self.set_property("ratio", float(ratio))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]