From 8d68816d219facc0225cb9e5774cee3742c851ca Mon Sep 17 00:00:00 2001 From: trigg Date: Wed, 30 Sep 2020 19:51:19 +0100 Subject: [PATCH] - Fixed #52 - expand .gitignore --- .gitignore | 1 + discover_overlay/voice_overlay.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4089147..3a1424b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build env .vscode/launch.json .vscode/settings.json +__pycache__ \ No newline at end of file diff --git a/discover_overlay/voice_overlay.py b/discover_overlay/voice_overlay.py index d080ce0..dc8e610 100644 --- a/discover_overlay/voice_overlay.py +++ b/discover_overlay/voice_overlay.py @@ -237,6 +237,11 @@ class VoiceOverlayWindow(OverlayWindow): context.show_text(string) def draw_avatar_pix(self, context, pixbuf, x, y, c, alpha): + if not pixbuf: + pixbuf = self.def_avatar + + if not pixbuf: + return context.move_to(x, y) context.save() #context.set_source_pixbuf(pixbuf, 0.0, 0.0) @@ -244,8 +249,7 @@ class VoiceOverlayWindow(OverlayWindow): context.arc(x + (self.avatar_size / 2), y + (self.avatar_size / 2), self.avatar_size / 2, 0, 2 * math.pi) context.clip() - if not pixbuf: - pixbuf = self.def_avatar + self.set_wind_col() context.set_operator(cairo.OPERATOR_SOURCE) context.rectangle(x, y, self.avatar_size, self.avatar_size)