feature: CardArea.text_box now accepts a padding_bottom options, using this to adjust the spaces in the story cards

* removed render_empty_line because it is no longer needed
pull/6827/head
Jens Ulferts 14 years ago
parent cf5be48904
commit 6d9eedd6a7
  1. 12
      lib/taskboard_card/bottom_attributes.rb
  2. 13
      lib/taskboard_card/card_area.rb
  3. 3
      lib/taskboard_card/description.rb
  4. 3
      lib/taskboard_card/header.rb

@ -24,10 +24,10 @@ module TaskboardCard
:align => :right})
assigned_to_box = render_assigned_to(pdf, issue, {:at => [0, category_box.y],
:width => pdf.bounds.width - category_box.width})
:width => pdf.bounds.width - category_box.width,
:padding_bottom => 20})
offset = render_empty_line(pdf, 12, [0, category_box.y - category_box.height])
render_sub_issues(pdf, issue, {:at => offset})
render_sub_issues(pdf, issue, {:at => [0, assigned_to_box.y - assigned_to_box.height]})
end
end
@ -62,7 +62,8 @@ module TaskboardCard
temp_box = text_box(pdf,
"#{l(:label_subtask_plural)}: #{issue.children.size == 0 ? "-" : ""}",
{:height => pdf.font.height,
:at => box.at})
:at => box.at,
:paddint_bottom => 6})
box.height += temp_box.height
box.width = temp_box.width
@ -73,7 +74,8 @@ module TaskboardCard
temp_box = text_box(pdf,
"#{child.tracker.name} ##{child.id}: #{child.subject}",
{:height => pdf.font.height,
:at => [10, at[1] - box.height]})
:at => [10, at[1] - box.height],
:padding_bottom => 3})
else
temp_box = text_box(pdf,
l('backlogs.x_more', :count => issue.children.size - i),

@ -14,12 +14,13 @@ module TaskboardCard
end
opts = {:width => pdf.bounds.width,
:overflow => :ellipses}
:overflow => :ellipses,
:padding_bottom => 10}
opts.merge!(options)
pdf.text_box(text, opts)
Box.new(options[:at][0], options[:at][1], options[:width], options[:height])
Box.new(opts[:at][0], opts[:at][1], opts[:width], opts[:height] + opts[:padding_bottom])
end
def self.render_bounding_box(pdf, options)
@ -47,14 +48,6 @@ module TaskboardCard
[0, 0]
end
def self.render_empty_line(pdf, font_size, offset)
pdf.font_size(font_size) do
offset = [offset[0], offset[1] - pdf.font_size]
end
offset
end
def self.margin
0
end

@ -36,7 +36,8 @@ module TaskboardCard
line,
{:height => pdf.height_of(line, :size => font_height),
:at => [0, y_offset],
:size => font_height})
:size => font_height,
:padding_bottom => 0})
y_offset -= box.height
else

@ -21,7 +21,8 @@ module TaskboardCard
issue_identification,
{:height => 20,
:at => offset,
:size => 20})
:size => 20,
:padding_bottom => 5})
offset[1] -= box.height
pdf.line offset, [pdf.bounds.width, offset[1]]

Loading…
Cancel
Save