Skip to content

Commit

Permalink
Merge branch 'category-tallies'
Browse files Browse the repository at this point in the history
  • Loading branch information
paulheider committed Jan 6, 2018
2 parents 721ff1e + e46c559 commit 08e2e6b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 19 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ It stops (pauses) all timers, updates the displayed calculations,
and save all timers to disk. The pop-up tells you the new file's
name. The 'save' button requires a long-press.

A count of group members is displayed near the outside edge of each
category. You can adjust the tally for each group using the +/- buttons
beside the count.

For more information or to post bugs, issues, and recommendations,
please visit the app's GitHub pages:
- https://github.com/paulheider/YouDoneBro
Expand Down
55 changes: 39 additions & 16 deletions main.kv
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ ScreenManagement:
on_release:
root.manager.transition.direction = 'up'
root.manager.current = 'Four-Way Tracker'
background_normal: ''
## rgb(149,165,166)
background_color: [ .58431372549019607843 , .64705882352941176470 , .65098039215686274509 , 1 ]

<RootWidget>:
canvas.before:
Expand All @@ -75,18 +78,23 @@ ScreenManagement:
Button:
id: dec_fac_bro_btn
text: '-'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.125 , 'top': 0.95 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.115 , 'top': 0.96 }
on_press: self.parent.tap( 'dec_fac_bro' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
## rgb(241,196,15)
background_color: [ 0.94 , 0.77 , 0.06 , 1 ]
Label:
id: fac_bro_count
text: '0'
size_hint: 0.5,0.05
pos_hint: {'center_x': 0.25 , 'top': 0.95 }
Button:
id: inc_fac_bro_btn
text: '+'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.375 , 'top': 0.95 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.385 , 'top': 0.96 }
on_press: self.parent.tap( 'inc_fac_bro' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
Expand Down Expand Up @@ -119,18 +127,23 @@ ScreenManagement:
Button:
id: dec_fac_nd_btn
text: '-'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.625 , 'top': 0.95 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.615 , 'top': 0.96 }
on_press: self.parent.tap( 'dec_fac_nd' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
## rgb(241,196,15)
background_color: [ 0.94 , 0.77 , 0.06 , 1 ]
Label:
id: fac_nd_count
text: '0'
size_hint: 0.5,0.05
pos_hint: {'center_x': 0.75 , 'top': 0.95 }
Button:
id: inc_fac_nd_btn
text: '+'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.875 , 'top': 0.95 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.885 , 'top': 0.96 }
on_press: self.parent.tap( 'inc_fac_nd' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
Expand Down Expand Up @@ -195,18 +208,23 @@ ScreenManagement:
Button:
id: dec_nf_bro_btn
text: '-'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.125 , 'center_y': 0.075 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.115 , 'center_y': 0.065 }
on_press: self.parent.tap( 'dec_nf_bro' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
## rgb(241,196,15)
background_color: [ 0.94 , 0.77 , 0.06 , 1 ]
Label:
id: nf_bro_count
text: '0'
size_hint: 0.5,0.05
pos_hint: {'center_x': 0.25 , 'center_y': 0.075 }
Button:
id: inc_nf_bro_btn
text: '+'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.375 , 'center_y': 0.075 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.385 , 'center_y': 0.065 }
on_press: self.parent.tap( 'inc_nf_bro' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
Expand Down Expand Up @@ -239,18 +257,23 @@ ScreenManagement:
Button:
id: dec_nf_nd_btn
text: '-'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.625 , 'center_y': 0.075 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.615 , 'center_y': 0.065 }
on_press: self.parent.tap( 'dec_nf_nd' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
## rgb(241,196,15)
background_color: [ 0.94 , 0.77 , 0.06 , 1 ]
Label:
id: nf_nd_count
text: '0'
size_hint: 0.5,0.05
pos_hint: {'center_x': 0.75 , 'center_y': 0.075 }
Button:
id: inc_nf_nd_btn
text: '+'
size_hint: 0.225,0.05
pos_hint: {'center_x': 0.875 , 'center_y': 0.075 }
size_hint: 0.2,0.05
pos_hint: {'center_x': 0.885 , 'center_y': 0.065 }
on_press: self.parent.tap( 'inc_nf_nd' )
background_normal: ''
color: [ 0 , 0 , 0 , 1 ]
Expand Down
13 changes: 10 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ def __init__(self):
def __repr__(self):
hours, remainder = divmod( int( self.get_elapsed() ) , 3600 )
minutes, seconds = divmod( remainder , 60 )
return '{:02d}:{:02d}:{:02d} ({})'.format( hours , minutes , seconds ,
self.__members )
return '{:02d}:{:02d}:{:02d}'.format( hours , minutes , seconds )

from kivy.clock import Clock
from functools import partial
Expand All @@ -102,7 +101,7 @@ class ScreenManagement( ScreenManager ):
pass

class AboutScreen(Screen):
__version__ = '17.49.2'
__version__ = '17.49.5'

def version( self , *args ):
return self.__version__
Expand Down Expand Up @@ -219,8 +218,10 @@ def tap(self, button):
self.nf_nd_watch.stop()
elif( button == 'dec_fac_bro' ):
self.fac_bro_watch.dec()
self.ids[ 'fac_bro_count' ].text = '{}'.format( self.fac_bro_watch.get_member_count() )
elif( button == 'inc_fac_bro' ):
self.fac_bro_watch.inc()
self.ids[ 'fac_bro_count' ].text = '{}'.format( self.fac_bro_watch.get_member_count() )
elif( button == 'fac_bro' ):
if( self.fac_bro_watch.get_running() ):
self.fac_bro_watch.stop()
Expand All @@ -231,8 +232,10 @@ def tap(self, button):
self.nf_nd_watch.stop()
elif( button == 'dec_fac_nd' ):
self.fac_nd_watch.dec()
self.ids[ 'fac_nd_count' ].text = '{}'.format( self.fac_nd_watch.get_member_count() )
elif( button == 'inc_fac_nd' ):
self.fac_nd_watch.inc()
self.ids[ 'fac_nd_count' ].text = '{}'.format( self.fac_nd_watch.get_member_count() )
elif( button == 'fac_nd' ):
if( self.fac_nd_watch.get_running() ):
self.fac_nd_watch.stop()
Expand All @@ -243,8 +246,10 @@ def tap(self, button):
self.nf_nd_watch.stop()
elif( button == 'dec_nf_bro' ):
self.nf_bro_watch.dec()
self.ids[ 'nf_bro_count' ].text = '{}'.format( self.nf_bro_watch.get_member_count() )
elif( button == 'inc_nf_bro' ):
self.nf_bro_watch.inc()
self.ids[ 'nf_bro_count' ].text = '{}'.format( self.nf_bro_watch.get_member_count() )
elif( button == 'nf_bro' ):
if( self.nf_bro_watch.get_running() ):
self.nf_bro_watch.stop()
Expand All @@ -255,8 +260,10 @@ def tap(self, button):
self.nf_nd_watch.stop()
elif( button == 'dec_nf_nd' ):
self.nf_nd_watch.dec()
self.ids[ 'nf_nd_count' ].text = '{}'.format( self.nf_nd_watch.get_member_count() )
elif( button == 'inc_nf_nd' ):
self.nf_nd_watch.inc()
self.ids[ 'nf_nd_count' ].text = '{}'.format( self.nf_nd_watch.get_member_count() )
elif( button == 'nf_nd' ):
if( self.nf_nd_watch.get_running() ):
self.nf_nd_watch.stop()
Expand Down

0 comments on commit 08e2e6b

Please sign in to comment.