Upgrade Kivy and fix font error
This commit is contained in:
parent
968ad8a788
commit
49c6a64a7b
|
@ -1,19 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import kivy
|
||||
kivy.require('1.11.1')
|
||||
kivy.require('2.0.0')
|
||||
|
||||
from kivy.app import App
|
||||
from kivy.config import Config
|
||||
from kivy.core.text import LabelBase
|
||||
from kivy.core.window import Window
|
||||
from kivy.properties import StringProperty, ObjectProperty, ListProperty, BooleanProperty
|
||||
from kivy.properties import ObjectProperty, ListProperty, BooleanProperty
|
||||
from kivy.resources import resource_add_path
|
||||
from kivy.uix.boxlayout import BoxLayout
|
||||
from kivy.uix.button import Button
|
||||
from kivy.uix.widget import Widget
|
||||
|
||||
from negromate.songs.loader import load_songs
|
||||
|
||||
|
@ -112,7 +109,7 @@ class KaraokeGUI(BoxLayout):
|
|||
|
||||
def play(self):
|
||||
subprocess.call([
|
||||
'vlc',
|
||||
'cvlc',
|
||||
'--fullscreen',
|
||||
'--no-sub-autodetect-file',
|
||||
'--sub-file',
|
||||
|
@ -140,6 +137,7 @@ class KaraokeApp(App):
|
|||
def main(path):
|
||||
# Window.fullscreen = True
|
||||
resource_add_path(os.path.dirname(__file__))
|
||||
Config.set('graphics', 'font_name', 'resources/fonts/CyrBit.ttf')
|
||||
Config.write()
|
||||
LabelBase.register(
|
||||
name='CyrBit',
|
||||
fn_regular='resources/fonts/CyrBit.ttf')
|
||||
KaraokeApp(path).run()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
KaraokeGUI:
|
||||
|
||||
<Label>:
|
||||
font_name: 'CyrBit.ttf'
|
||||
font_name: 'CyrBit'
|
||||
font_size: 12
|
||||
|
||||
<Action@Button>:
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Kivy==1.11.1
|
||||
Kivy==2.0.0
|
||||
negromate.songs @ git+https://git.negromate.rocks/NegroMate/songs.git@1.0
|
||||
|
|
Loading…
Reference in New Issue