Skip to content

Commit

Permalink
add color to the first part of the track slider. closes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Oct 15, 2012
1 parent 8e22ebb commit 61a1474
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/app.co
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,10 @@ function queueSelection (event)
socket.emit 'Chat', message
return false

!function updateSliderUi (value)
percent = value * 100
$track_slider.css('background-size', "#percent% 100%")

!function setUpNowPlayingUi
actions =
toggle: togglePlayback
Expand All @@ -1336,9 +1340,11 @@ function queueSelection (event)
min: 0
max: 1
change: !(event, ui) ->
updateSliderUi(ui.value)
return if not event.originalEvent?
mpd.seek ui.value * mpd.status.time
slide: !(event, ui) ->
updateSliderUi(ui.value)
$nowplaying_elapsed.html Util.formatTime(ui.value * mpd.status.time)
start: !(event, ui) -> user_is_seeking := true
stop: !(event, ui) -> user_is_seeking := false
Expand Down
3 changes: 3 additions & 0 deletions src/client/styles/app.styl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ body
#track-slider
margin 10px 10px 5px

background url("img/bright-10.png") left no-repeat
background-size 0% 100%

#nowplaying
margin 6px auto
text-align center
Expand Down
Binary file added src/public/img/bright-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61a1474

Please sign in to comment.