[117231] trunk/base/src/port/port.tcl
raimue at macports.org
raimue at macports.org
Wed Feb 19 14:16:54 PST 2014
Revision: 117231
https://trac.macports.org/changeset/117231
Author: raimue at macports.org
Date: 2014-02-19 14:16:54 -0800 (Wed, 19 Feb 2014)
Log Message:
-----------
port.tcl: Use reverse video for drawing the progress bar
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2014-02-19 21:54:56 UTC (rev 117230)
+++ trunk/base/src/port/port.tcl 2014-02-19 22:16:54 UTC (rev 117231)
@@ -5001,8 +5001,8 @@
# Finally, also provide a percentage value to print behind the progress bar
set percentage [expr {double($current) * 100 / double($total)}]
- # clear the current line
- set progressbar ""
+ # clear the current line, enable reverse video
+ set progressbar "\033\[7m"
for {set i 0} {$i < $barInteger} {incr i} {
# U+2588 FULL BLOCK doesn't match the other blocks in some fonts :/
# Two half blocks work better in some fonts, but not in others (because
@@ -5010,8 +5010,10 @@
# worse and even just using full blocks looks ugly in a few fonts.
# Use pure ASCII until somebody fixes most of the default terminal fonts :/
- append progressbar "#"
+ append progressbar " "
}
+ # back to normal output
+ append progressbar "\033\[0m"
#switch $barRemainder {
# 0 {
@@ -5054,7 +5056,7 @@
#}
# Fill the progress bar with spaces
- for {set i [string length $progressbar]} {$i < $barWidth} {incr i} {
+ for {set i $barInteger} {$i < $barWidth} {incr i} {
append progressbar " "
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140219/4864277a/attachment-0001.html>
More information about the macports-changes
mailing list