From 4f90528655ebda14239c94aef85b47abd31132d8 Mon Sep 17 00:00:00 2001 From: flavio Date: Thu, 26 Jul 2012 01:47:04 +0000 Subject: size corrections --- diff --git a/face.py b/face.py index 44efda3..6aa3151 100644 --- a/face.py +++ b/face.py @@ -96,7 +96,6 @@ class Status: class View(Gtk.EventBox): def __init__(self, fill_color=style.COLOR_BUTTON_GREY): Gtk.EventBox.__init__(self) - self.status = Status() self.fill_color = fill_color @@ -169,9 +168,9 @@ class View(Gtk.EventBox): for i in status.eyes: eye = i(self.fill_color) self._eyes.append(eye) - self._eyebox.pack_start(eye, FACE_PAD, False, 0) + self._eyebox.pack_start(eye, True, True, 0) eye.show() - + self._mouth = status.mouth(self._audio, self.fill_color) self._mouth.show() self._mouthbox.add(self._mouth) diff --git a/mouth.py b/mouth.py index 6ff6243..1155bb0 100644 --- a/mouth.py +++ b/mouth.py @@ -24,7 +24,6 @@ # This code is a super-stripped down version of the waveform view from Measure from gi.repository import Gtk -from gi.repository import cairo from struct import unpack import numpy.core @@ -33,7 +32,7 @@ class Mouth(Gtk.DrawingArea): def __init__(self, audioSource, fill_color): Gtk.DrawingArea.__init__(self) - + self.buffers = [] self.buffer_size = 256 self.main_buffers = [] diff --git a/waveform_mouth.py b/waveform_mouth.py index c3a4ba5..51c47f4 100644 --- a/waveform_mouth.py +++ b/waveform_mouth.py @@ -49,7 +49,7 @@ class WaveformMouth(Mouth): #Create context, disable antialiasing self.context = context - self.context.set_antialias(cairo.ANTIALIAS_NONE) + #self.context.set_antialias(cairo.ANTIALIAS_NONE) #set a clip region for the expose event. #This reduces redrawing work (and time) @@ -78,7 +78,7 @@ class WaveformMouth(Mouth): peak = 0 x = count / buflen * bounds.width - self.context.line_to(x, bounds. height - peak) + self.context.line_to(x, bounds.height - peak) count += 1 self.context.set_source_rgb(0, 0, 0) -- cgit v0.9.1