Control: tag -1 patch

On 2013-09-16 17:42:20, Joey Hess wrote:
> When run on a Lenovo Yaga 11s, I get a video window that takes up 95% of
> the width of the screen. Not enough space is left to display the QR code
> at even 1 pixel per dot (which is surely too small to scan it).
>
> I guess that you need to do something to cope with webcams that have a
> resolution approaching or exceeding the screen resolution..
>
> My webcam is a "Lenovo easycam", and cheese says it supports a resultion
> of 1280x720, as well as some smaller ones.

Hi!

I couldn't figure out how to tell the zbar library to change the size of
the window. All I could find was GTK's Widget.set_size_request()
parameter, and I can't really test it because my webcam doesn't have
that good of a resolution.

Could you try the following patch?

diff --git a/monkeysign/gtkui.py b/monkeysign/gtkui.py
index ec426a9..1b4aa62 100644
--- a/monkeysign/gtkui.py
+++ b/monkeysign/gtkui.py
@@ -192,6 +192,7 @@ class MonkeysignScan(gtk.Window):
                         self.zbar = zbarpygtk.Gtk()
                         self.zbar.connect("decoded-text", self.decoded)
                         self.zbarframe = gtk.Frame()
+                        self.zbarframe.set_size_request(500,500)
                         self.zbarframe.add(self.zbar)
                         self.video_cb.set_active(0)
                 else:

But really, it doesn't seem like this is easily fixable.. :(

A.

-- 
O gentilshommes, la vie est courte.
Si nous vivons, nous vivons 
pour marcher sur la tête des rois.
                        - William Shakespeare

Attachment: pgpnIqbIl1djz.pgp
Description: PGP signature

Reply via email to