fix fonts

This commit is contained in:
Sander Land committed 2020-12-14 12:15:53 +01:00
1 parent de898569b6
commit 9a69fd1f5f
5 files changed
+6 -5

No files matched your search

+1
View File
@@ -628,6 +628,7 @@ class KaTrainApp(MDApp):
kv_file = find_package_resource("katrain/gui.kv")
popup_kv_file = find_package_resource("katrain/popups.kv")
resource_add_path(PATHS["PACKAGE"] + "/fonts")
resource_add_path(PATHS["PACKAGE"] + "/sounds")
resource_add_path(PATHS["PACKAGE"] + "/img")
resource_add_path(os.path.abspath(os.path.expanduser(DATA_FOLDER))) # prefer resources in .katrain
+1 -1
View File
@@ -11,7 +11,7 @@ from katrain.gui.theme import Theme
class Lang(Observable):
observers = []
callbacks = []
FONTS = {"jp": "fonts/NotoSansJP-Regular.otf"}
FONTS = {"jp": "NotoSansJP-Regular.otf"}
def __init__(self, lang):
super(Lang, self).__init__()
+1 -1
View File
@@ -338,7 +338,7 @@
color: Theme.TIMER_TEXT_TIMEOUT_COLOR if self.timeout else Theme.TIMER_TEXT_COLOR
markup: True
max_lines: 1
font_name: 'fonts/digital-7 (mono).ttf'
font_name: 'digital-7 (mono).ttf'
<Timer>:
spacing: CP_SPACING
+1 -1
View File
@@ -18,7 +18,7 @@ BLUE = [0.3, 0.7, 0.9, 1]
class Theme:
# font
DEFAULT_FONT = "fonts/NotoSansCJKsc-Regular.otf"
DEFAULT_FONT = "NotoSansCJKsc-Regular.otf"
INPUT_FONT_SIZE = 25 # sp
DESC_FONT_SIZE = 20 # sp
NOTES_FONT_SIZE = 18 # sp
+2 -2
View File
@@ -76,7 +76,7 @@ class ScoreGraph(Graph):
navigate_move = ListProperty([None, 0, 0, 0])
def on_touch_down(self, touch):
if self.collide_point(*touch.pos) and "scroll" not in getattr(touch, "button",''):
if self.collide_point(*touch.pos) and "scroll" not in getattr(touch, "button", ""):
print(touch)
ix, _ = min(enumerate(self.score_points[::2]), key=lambda ix_v: abs(ix_v[1] - touch.x))
self.navigate_move = [
@@ -92,7 +92,7 @@ class ScoreGraph(Graph):
return self.on_touch_down(touch)
def on_touch_up(self, touch):
if self.collide_point(*touch.pos) and self.navigate_move[0] and "scroll" not in getattr(touch, "button",''):
if self.collide_point(*touch.pos) and self.navigate_move[0] and "scroll" not in getattr(touch, "button", ""):
katrain = MDApp.get_running_app().gui
if katrain and katrain.game:
katrain.game.set_current_node(self.navigate_move[0])