diff options
author | MaZderMind <git@mazdermind.de> | 2015-06-18 18:47:20 +0200 |
---|---|---|
committer | MaZderMind <git@mazdermind.de> | 2015-06-18 18:47:20 +0200 |
commit | ff22a8409194cc499f2f9889d88cee2be2b731c8 (patch) | |
tree | 4a698e15856529af5de066e4c2f30115b9859b85 | |
parent | 2e7194ad7916bef47a8e322353a3cdbd27953697 (diff) |
Set Preview-Sizes from Config
-rw-r--r-- | voctogui/default-config.ini | 5 | ||||
-rw-r--r-- | voctogui/lib/ui.py | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/voctogui/default-config.ini b/voctogui/default-config.ini index 354a8c9..6bc1d34 100644 --- a/voctogui/default-config.ini +++ b/voctogui/default-config.ini @@ -1,2 +1,3 @@ -[gui] -foo=bar +[previews] +width=320 +#height=180 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) |