From dd25f8f05f091ba876b784e3fd4ae6df309bd4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 29 Jul 2016 01:28:41 +0200 Subject: Code cleanup --- music_sampler.spec | 10 ++++++++-- music_sampler/app.py | 7 ++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/music_sampler.spec b/music_sampler.spec index 5549b76..bd69562 100644 --- a/music_sampler.spec +++ b/music_sampler.spec @@ -6,7 +6,7 @@ from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal,\ import importlib.machinery sysfont = importlib.machinery\ - .SourceFileLoader('sysfont', os.getcwd() + '/music_sampler/sysfont.py') \ + .SourceFileLoader('sysfont', os.getcwd()+'/music_sampler/sysfont.py') \ .load_module() excluded_and_hidden_modules = get_deps_minimal( @@ -40,7 +40,13 @@ a = Analysis(['run.py'], runtime_hooks=runtime_hooks(), **excluded_and_hidden_modules) -for fontname, style in [("Ubuntu", sysfont.STYLE_NORMAL), ("Ubuntu", sysfont.STYLE_BOLD), ("Symbola", sysfont.STYLE_NONE)]: +fonts = [ + ("Ubuntu", sysfont.STYLE_NORMAL), + ("Ubuntu", sysfont.STYLE_BOLD), + ("Symbola", sysfont.STYLE_NONE) +] + +for fontname, style in fonts: font = sysfont.get_font(fontname, style=style) a.datas.append(( 'fonts/{}_{}.ttf'.format(fontname, style), diff --git a/music_sampler/app.py b/music_sampler/app.py index cce3969..08a8891 100644 --- a/music_sampler/app.py +++ b/music_sampler/app.py @@ -6,16 +6,17 @@ import kivy kivy.require("1.9.1") from kivy.app import App from kivy.uix.floatlayout import FloatLayout -from kivy.uix.stacklayout import StackLayout from kivy.uix.relativelayout import RelativeLayout from kivy.properties import ListProperty, StringProperty from kivy.core.window import Window from kivy.lang import Builder -from .key import Key -from .mapping import Mapping register_fonts() + +from .key import Key +from .mapping import Mapping + from .app_blocks.actionlist import * from .app_blocks.playlist import * -- cgit v1.2.3