From ff22a8409194cc499f2f9889d88cee2be2b731c8 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Thu, 18 Jun 2015 18:47:20 +0200 Subject: Set Preview-Sizes from Config --- voctogui/lib/ui.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'voctogui/lib/ui.py') diff --git a/voctogui/lib/ui.py b/voctogui/lib/ui.py index e3e2db0..e066a90 100644 --- a/voctogui/lib/ui.py +++ b/voctogui/lib/ui.py @@ -2,6 +2,7 @@ import gi, logging from gi.repository import Gtk, Gst +from lib.config import Config from lib.uibuilder import UiBuilder from lib.videodisplay import VideoDisplay @@ -37,7 +38,17 @@ class Ui(UiBuilder): preview = self.get_check_widget('widget_preview', clone=True) video = self.find_widget_recursive(preview, 'video') - # video.set_size_request(160, 90) + try: + width = Config.getint('previews', 'width') + except: + width = 320 + + try: + height = Config.getint('previews', 'height') + except: + height = width*9/16 + + video.set_size_request(width, height) box.pack_start(preview, fill=False, expand=False, padding=0) -- cgit v1.2.3