OSDN Git Service

fix argument mistake.
authorornse01 <ornse01@users.sourceforge.jp>
Sat, 5 May 2012 06:24:19 +0000 (06:24 +0000)
committerornse01 <ornse01@users.sourceforge.jp>
Sat, 5 May 2012 06:24:19 +0000 (06:24 +0000)
git-svn-id: http://svn.sourceforge.jp/svnroot/bchan/bchanf/trunk@465 20a0b8eb-f62a-4a12-8fe1-b598822500fb

src/tools/panel_generator.rb

index 3459631..e5e4eca 100644 (file)
@@ -320,9 +320,9 @@ IMPORT <%= panel_result_type_name() %> <%= panel_function_name() %>(<%= panel_ar
     when "flush left", "justification"
       return @panel_padding_left + @margin_left;
     when "flush right"
-      return @panel_padding_left + content_width - line.width;
+      return @panel_padding_left + content_width - line.width(@margin_left + @margin_right);
     when "centering"
-      return @panel_padding_left + (content_width - line.width) / 2;
+      return @panel_padding_left + (content_width - line.width(@margin_left + @margin_right)) / 2;
     end
   end
   def calc_line_layout_item_margin(content_width, line)