summaryrefslogtreecommitdiff
path: root/voctogui/lib
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-06-18 18:47:20 +0200
committerMaZderMind <git@mazdermind.de>2015-06-18 18:47:20 +0200
commitff22a8409194cc499f2f9889d88cee2be2b731c8 (patch)
tree4a698e15856529af5de066e4c2f30115b9859b85 /voctogui/lib
parent2e7194ad7916bef47a8e322353a3cdbd27953697 (diff)
Set Preview-Sizes from Config
Diffstat (limited to 'voctogui/lib')
-rw-r--r--voctogui/lib/ui.py13
1 files changed, 12 insertions, 1 deletions
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)