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