[pitivi] viewer: Do not ignore the minimum size requested by the super class
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] viewer: Do not ignore the minimum size requested by the super class
- Date: Tue, 28 Jun 2016 15:09:50 +0000 (UTC)
commit ef39f7cb5cde42ddfe26f8d63655e9b189d261e3
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Jun 27 15:57:30 2016 +0200
viewer: Do not ignore the minimum size requested by the super class
Fixes the following warning printed in the console:
Gtk-WARNING **: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node
border, owner pitivi+viewer+viewer+ViewerWidget)
Differential Revision: https://phabricator.freedesktop.org/D1134
pitivi/viewer/viewer.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/viewer/viewer.py b/pitivi/viewer/viewer.py
index 3edcfff..e02b012 100644
--- a/pitivi/viewer/viewer.py
+++ b/pitivi/viewer/viewer.py
@@ -493,16 +493,16 @@ class ViewerWidget(Gtk.AspectFrame, Loggable):
self.set_property("ratio", float(ratio))
def do_get_preferred_width(self):
- Gtk.AspectFrame.do_get_preferred_width(self)
+ mininum, unused_natural = Gtk.AspectFrame.do_get_preferred_width(self)
# Do not let a chance for Gtk to choose video natural size
# as we want to have full control
- return 0, 1
+ return mininum, mininum + 1
def do_get_preferred_height(self):
- Gtk.AspectFrame.do_get_preferred_height(self)
+ mininum, unused_natural = Gtk.AspectFrame.do_get_preferred_height(self)
# Do not let a chance for Gtk to choose video natural size
# as we want to have full control
- return 0, 1
+ return mininum, mininum + 1
class PlayPauseButton(Gtk.Button, Loggable):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]