From b6ebd063421d0b8513d410553ad9a0b6e6f86014 Mon Sep 17 00:00:00 2001 From: shagi Date: Sun, 16 Feb 2020 18:46:30 +0100 Subject: [PATCH] Mejoras en la gui --- gui/karaoke.ini | 3 ++ gui/karaoke.py | 7 +++- gui/kv_templates/karaoke.kv | 82 ++++++++++++++++++++++++------------- 3 files changed, 63 insertions(+), 29 deletions(-) create mode 100644 gui/karaoke.ini diff --git a/gui/karaoke.ini b/gui/karaoke.ini new file mode 100644 index 0000000..d82598c --- /dev/null +++ b/gui/karaoke.ini @@ -0,0 +1,3 @@ +[graphics] +font_name = CyrBit.ttf + diff --git a/gui/karaoke.py b/gui/karaoke.py index 4b44fbf..9012255 100644 --- a/gui/karaoke.py +++ b/gui/karaoke.py @@ -7,6 +7,7 @@ import kivy kivy.require('1.11.1') from kivy.app import App +from kivy.config import Config from kivy.core.window import Window from kivy.properties import StringProperty, ObjectProperty, ListProperty, BooleanProperty from kivy.uix.boxlayout import BoxLayout @@ -60,7 +61,7 @@ class Song(BoxLayout): self.ass = str(entry) elif entry.name == 'thumb.jpg': self.thumbnail = str(entry) - elif entry.name.endswith('jpg'): + elif entry.name == 'cover.jpg': self.cover = str(entry) elif entry.name == 'index.html': continue @@ -114,7 +115,9 @@ class KaraokeGUI(BoxLayout): song.active = False value.active = True current_song_image = self.ids['current_song_image'] + current_song_title = self.ids['current_song_title'] current_song_image.source = value.cover + current_song_title.text = value.name scrollview = self.ids['songs_scroll'] scrollview.scroll_to(value) @@ -175,4 +178,6 @@ class KaraokeApp(App): if __name__ == '__main__': Window.fullscreen = True + Config.set('graphics', 'font_name', 'CyrBit.ttf') + Config.write() KaraokeApp(Path(sys.argv[1])).run() diff --git a/gui/kv_templates/karaoke.kv b/gui/kv_templates/karaoke.kv index b7d80c8..b4e3411 100644 --- a/gui/kv_templates/karaoke.kv +++ b/gui/kv_templates/karaoke.kv @@ -1,57 +1,89 @@ KaraokeGUI: +