Anonymous avatar Anonymous committed 912ca27

Makes the png looks more like the html gantt.

Comments (0)

Files changed (1)

lib/redmine/helpers/gantt.rb

         	(date_to - @date_from + 1).to_i.times do 
               width =  zoom
               gc.fill(wday == 6 || wday == 7 ? '#eee' : 'white')
-              gc.stroke('grey')
+              gc.stroke('#ddd')
               gc.stroke_width(1)
               gc.rectangle(left, 2*header_heigth, left + width, 2*header_heigth + g_height-1)
               left = left + width
         
         # Renders the task bar, with progress and late
         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)
  
           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)
           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)
           end
         end
         # Renders the markers
         if options[:markers]
           if coords[:start]
+            x = params[:subject_width] + coords[:start]
+            y = params[:top] - height / 2
             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
           if coords[:end]
+            x = params[:subject_width] + coords[:end] + params[:zoom]
+            y = params[:top] - height / 2
             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
         # Renders the label on the right
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.