Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit 7ff2edb

Browse files
authored
Merge pull request #61 from GoBig87/GoBig87
Fixes Issue #5. Makes paths agnostitic to os.
2 parents 5629a8f + 3122d84 commit 7ff2edb

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

tactless-tricksters/ui/screens/listening_training_screen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kivy imports
22
import random
33
import time
4+
import os
45

56
from kivy.clock import Clock
67
from kivy.factory import Factory
@@ -97,7 +98,6 @@ def on_short_pause(self, *largs):
9798
9899
Image:
99100
size_hint: 1, 1
100-
source: 'ui\img\morse_code_alphabet.png'
101101
102102
MDLabel:
103103
id: tapping_prompt_label
@@ -158,6 +158,7 @@ class ListeningScreen(Screen):
158158
def __init__(self, **kwargs):
159159
super(ListeningScreen, self).__init__(name=kwargs.get('name'))
160160
self.util = kwargs.get('util')
161+
self.children[0].children[5].source = os.path.join('ui', 'img', 'morse_code_alphabet.png')
161162

162163
def on_enter(self):
163164
Clock.schedule_once(self.init_listening_screen, 0)

tactless-tricksters/ui/screens/tapping_training_screen.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kivy imports
22
import random
33
import time
4+
import os
45

56
from kivy.clock import Clock
67
from kivy.factory import Factory
@@ -99,7 +100,6 @@ def on_short_pause(self, *largs):
99100
100101
Image:
101102
size_hint: 1, 1
102-
source: 'ui\img\morse_code_alphabet.png'
103103
104104
MDLabel:
105105
id: tapping_prompt_label
@@ -148,7 +148,7 @@ def on_short_pause(self, *largs):
148148
size: [dp(56), dp(56)]
149149
bg_color: app.theme_cls.primary_color
150150
text_color: [1, 1, 1, 1]
151-
on_short_press: root.tapped('.')
151+
on_short_press: root.tapped('.')
152152
on_long_press: root.tapped('-')
153153
on_short_pause: root.tapped(' ')
154154
on_long_pause: root.tapped('/')
@@ -170,6 +170,7 @@ class TappingScreen(Screen):
170170
def __init__(self, **kwargs):
171171
super(TappingScreen, self).__init__(name=kwargs.get('name'))
172172
self.util = kwargs.get('util')
173+
self.children[0].children[5].source = os.path.join('ui', 'img', 'morse_code_alphabet.png')
173174

174175
def on_enter(self):
175176
Clock.schedule_once(self.init_tapping_screen, 0)

tactless-tricksters/ui/screens/welcome_screen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def __init__(self, **kwargs):
117117
self.add_widget(self.nav_bar_anchor)
118118

119119
Clock.schedule_once(self.texture_init, 0)
120-
Clock.schedule_interval(self.scroll_texture, 1 / 60.)
120+
Clock.schedule_interval(self.scroll_texture, 1 / 20.)
121121

122122
def texture_init(self, *args):
123123
self.canvas.before.children[-1].texture.wrap = 'repeat'

tactless-tricksters/ui/widgets/message_card.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
from kivy.uix.behaviors import ButtonBehavior
22
from kivy.app import App
3-
from kivy.metrics import dp
43
from kivy.clock import Clock
54
from kivy.factory import Factory
65

76
from kivymd.uix.card import MDCardPost
87

8+
import os
9+
910

1011
class LongPressButton(ButtonBehavior):
1112
__events__ = ('on_long_press',)
@@ -34,7 +35,7 @@ def __init__(self, **kwargs):
3435
text_post=kwargs.get('text_post'),
3536
name_data=kwargs.get('name_data'),
3637
swipe=kwargs.get('swipe'),
37-
path_to_avatar=kwargs.get('source'),
38+
path_to_avatar=os.path.join('ui', 'img', 'default_avatar.png'),
3839
)
3940

4041
self.util = kwargs.get('util')

tactless-tricksters/ui/widgets/nav_drawer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
from kivy.uix.anchorlayout import AnchorLayout
24
from kivy.app import App
35
from kivy.clock import Clock
@@ -11,7 +13,7 @@ def __init__(self, nav_layout):
1113
super(ContentNavigationDrawer, self).__init__()
1214
self.nav_layout = nav_layout
1315
self.use_logo = 'logo'
14-
self.drawer_logo = 'ui/img/nav_drawer_logo.png'
16+
self.drawer_logo = os.path.join('ui', 'img', 'nav_drawer_logo.png')
1517
self.home = NavigationDrawerIconButton(text="Home", icon='home',
1618
on_press=lambda x:
1719
self.scr_chng('welcome', self.home))

0 commit comments

Comments
 (0)