Skip to content
This repository has been archived by the owner on Aug 8, 2021. It is now read-only.

Commit

Permalink
Enable change font size
Browse files Browse the repository at this point in the history
  • Loading branch information
ujiro99 committed Jan 29, 2017
1 parent 05f4245 commit 6dcf0e9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/coffee/controllers/mainCtrl.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ timeTracker.controller 'MainCtrl', ($rootScope, $scope, $timeout, $location, $an
$rootScope.messages = []
# Global state
$scope.state = State
# Root font size
$scope.options = Option.getOptions()

###
Initialize.
Expand Down
1 change: 1 addition & 0 deletions src/coffee/services/option.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ timeTracker.factory("Option", ($q, Platform, Const, Log) ->
itemsPerPage: 20
stepTime: 15 # minutes
pomodoroTime: 25 # minutes
fontSize: 62.5 # %
isCollapseIssues: false # issue section collapse
isCollapseAccounts: false # accounts section collapse
isCollapseOptions: false # options section collapse
Expand Down
8 changes: 8 additions & 0 deletions src/jade/_options.jade
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ div#options.bottom-space-m(ng-controller='OptionCtrl')
div.setting__options
input.form-control.input-sm.setting__input(type="number", name="pomodoroTime", max="60", min="1", ng-model="options.pomodoroTime")

div.setting__section.form-group
div.setting__labels
label.control-label Font size
div.setting__description
span min: 50, max: 100
div.setting__options
input.form-control.input-sm.setting__input(type="number", name="fontSize", max="100", min="50", ng-model="options.fontSize")

div.setting__section.form-group
div.setting__labels
label.control-label Enable Project's Star
Expand Down
2 changes: 1 addition & 1 deletion src/jade/index.jade
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
!!! 5
html(ng-app='timeTracker', ng-csp="", ng-controller='MainCtrl')
html(ng-app='timeTracker', ng-csp="", style="font-size:{{options.fontSize}}%", ng-controller='MainCtrl')

head
meta(http-equiv='Content-Type', content='text/html; charset=UTF-8')
Expand Down
2 changes: 1 addition & 1 deletion src/stylus/components/switch.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ input[type=radio].switch
border-radius: 1.5rem
background-color: #fff
padding: .1rem
margin: -0.8rem
margin: -0.6rem
display: inline-block
width: 5.2rem
height: 3.1rem
Expand Down
7 changes: 3 additions & 4 deletions src/stylus/main.styl
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,9 @@ input.project-search

.setting__options
.btn-sm
font-size: .8rem
font-size: 1rem
color: $color_font
margin: 0 0 0 .5rem
padding: .3rem .6rem
padding: .3rem .8rem
&.loading
background-color: #eee !important
border-color: #adadad
Expand All @@ -558,7 +557,7 @@ input.project-search
margin-right: -0.6rem

.setting__input
width: 3.7rem
width: 4.5rem
text-align: right

.modal-dialog
Expand Down

0 comments on commit 6dcf0e9

Please sign in to comment.