Makes the png looks more like the html gantt.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4584 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
82f528ddc8
commit
dd87ebef58
|
@ -474,7 +474,7 @@ module Redmine
|
||||||
(date_to - @date_from + 1).to_i.times do
|
(date_to - @date_from + 1).to_i.times do
|
||||||
width = zoom
|
width = zoom
|
||||||
gc.fill(wday == 6 || wday == 7 ? '#eee' : 'white')
|
gc.fill(wday == 6 || wday == 7 ? '#eee' : 'white')
|
||||||
gc.stroke('grey')
|
gc.stroke('#ddd')
|
||||||
gc.stroke_width(1)
|
gc.stroke_width(1)
|
||||||
gc.rectangle(left, 2*header_heigth, left + width, 2*header_heigth + g_height-1)
|
gc.rectangle(left, 2*header_heigth, left + width, 2*header_heigth + g_height-1)
|
||||||
left = left + width
|
left = left + width
|
||||||
|
@ -824,27 +824,31 @@ module Redmine
|
||||||
|
|
||||||
# Renders the task bar, with progress and late
|
# Renders the task bar, with progress and late
|
||||||
if coords[:bar_start] && coords[:bar_end]
|
if coords[:bar_start] && coords[:bar_end]
|
||||||
params[:image].fill('grey')
|
params[:image].fill('#aaa')
|
||||||
params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_end], params[:top] - height)
|
params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_end], params[:top] - height)
|
||||||
|
|
||||||
if coords[:bar_late_end]
|
if coords[:bar_late_end]
|
||||||
params[:image].fill('red')
|
params[:image].fill('#f66')
|
||||||
params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_late_end], params[:top] - height)
|
params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_late_end], params[:top] - height)
|
||||||
end
|
end
|
||||||
if coords[:bar_progress_end]
|
if coords[:bar_progress_end]
|
||||||
params[:image].fill('green')
|
params[:image].fill('#00c600')
|
||||||
params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_progress_end], params[:top] - height)
|
params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_progress_end], params[:top] - height)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Renders the markers
|
# Renders the markers
|
||||||
if options[:markers]
|
if options[:markers]
|
||||||
if coords[:start]
|
if coords[:start]
|
||||||
|
x = params[:subject_width] + coords[:start]
|
||||||
|
y = params[:top] - height / 2
|
||||||
params[:image].fill('blue')
|
params[:image].fill('blue')
|
||||||
params[:image].rectangle(params[:subject_width] + coords[:start], params[:top] + 1, params[:subject_width] + coords[:start] + 4, params[:top] - 4)
|
params[:image].polygon(x-4, y, x, y-4, x+4, y, x, y+4)
|
||||||
end
|
end
|
||||||
if coords[:end]
|
if coords[:end]
|
||||||
|
x = params[:subject_width] + coords[:end] + params[:zoom]
|
||||||
|
y = params[:top] - height / 2
|
||||||
params[:image].fill('blue')
|
params[:image].fill('blue')
|
||||||
params[:image].rectangle(params[:subject_width] + coords[:end], params[:top] + 1, params[:subject_width] + coords[:end] + 4, params[:top] - 4)
|
params[:image].polygon(x-4, y, x, y-4, x+4, y, x, y+4)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Renders the label on the right
|
# Renders the label on the right
|
||||||
|
|
Loading…
Reference in New Issue