lib/canis/core/widgets/scrollbar.rb in canis-0.0.8 vs lib/canis/core/widgets/scrollbar.rb in canis-0.0.10
- old
+ new
@@ -85,21 +85,24 @@
raise ArgumentError, "list_length must be provided" unless @list_length
my_win = @form ? @form.window : @target_window
@graphic = my_win unless @graphic
return unless @repaint_required
+ # 2016-01-14 - replacing 1 with space in mvvline since junk is showing up in some cases.
+ space_char = " ".codepoints.first
+
# first print a right side vertical line
#bc = $bottomcolor # dark blue
bc = $datacolor
bordercolor = @border_color || bc
borderatt = @border_attrib || Ncurses::A_REVERSE
#$log.debug "SCROLL bordercolor #{bordercolor} , #{borderatt} " if $log.debug?
@graphic.attron(Ncurses.COLOR_PAIR(bordercolor) | borderatt)
#$log.debug " XXX SCROLL #{@row} #{@col} #{@length} "
- @graphic.mvvline(@row+0, @col, 1, @length-0)
+ @graphic.mvvline(@row+0, @col, space_char, @length-0)
@graphic.attroff(Ncurses.COLOR_PAIR(bordercolor) | borderatt)
# now calculate and paint the scrollbar
pht = @length
listlen = @list_length * 1.0
@@ -114,10 +117,10 @@
end
@graphic.attron(Ncurses.COLOR_PAIR(@scroll_pair) | borderatt)
r = @row + scloc
c = @col + 0
#$log.debug " XXX SCROLLBAR #{r} #{c} #{sclen} "
- @graphic.mvvline(r, c, 1, sclen)
+ @graphic.mvvline(r, c, space_char, sclen)
@graphic.attroff(Ncurses.COLOR_PAIR(@scroll_pair) | borderatt)
@repaint_required = false
end
##
##