From 3f7337568cab959054f5c75081644fb04fc5c254 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 17 Jul 2016 12:52:23 +0000 Subject: [PATCH] fix status bar bug in some android versions, show status bar time when pausing svn path=/trunk/; revision=142 --- pages/playctl.sh | 2 +- static/common.css | 5 ++++- templates/playctl.html.sh | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pages/playctl.sh b/pages/playctl.sh index c57e338..16e67a5 100755 --- a/pages/playctl.sh +++ b/pages/playctl.sh @@ -42,7 +42,7 @@ printf 'Refresh: 1\r\n' progress(){ cr="$(printf \\r)" - tail --pid=$$ -c0 -f "$statusfile" \ + tail --pid=$$ -c100 -f "$statusfile" \ | while read -d "$cr" line; do [ $line = "BREAK" ] && exit 0 printf '%s\n' "$line" diff --git a/static/common.css b/static/common.css index bc02726..858a1be 100644 --- a/static/common.css +++ b/static/common.css @@ -403,9 +403,12 @@ span.progress { border-top: 1px solid white; padding: 0; height: 1em; + overflow: hidden; } -span.progress > * { +span.progress > span { display: block; + position: absolute; text-align: center; background-color: #333; + min-width: 2em; } diff --git a/templates/playctl.html.sh b/templates/playctl.html.sh index 6279850..ec6467e 100755 --- a/templates/playctl.html.sh +++ b/templates/playctl.html.sh @@ -99,12 +99,15 @@ cat < Edit Tags + EOF cnt=0 progress \ | while read p t; do - printf '%d:%02d\n' "${p}" "$(($t / 60))" "$(($t % 60))" + printf '%d:%02d\n' "${p}" "$(($t / 60))" "$(($t % 60))" done +printf '' + # vi:set filetype=html: -- 2.39.2