/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to graphcell.py

  • Committer: Scott James Remnant
  • Date: 2005-10-17 07:54:28 UTC
  • Revision ID: scott@netsplit.com-20051017075428-75861ea962b06172
Fix the busted font size stuff, and then increase the sizes a bit to
compensate

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
            metrics = pango_ctx.get_metrics(font_desc)
73
73
 
74
74
            ascent = pango.PIXELS(metrics.get_ascent())
75
 
            descent = pango.PIXELS(metrics.get_ascent())
 
75
            descent = pango.PIXELS(metrics.get_descent())
76
76
 
77
 
            self._box_size = ascent + descent
 
77
            self._box_size = ascent + descent + 6
78
78
            return self._box_size
79
79
 
80
80
    def set_colour(self, ctx, colour, bg, fg):
140
140
 
141
141
        box_size = self.box_size(widget)
142
142
 
143
 
        ctx.set_line_width(box_size / 10)
 
143
        ctx.set_line_width(box_size / 8)
144
144
        ctx.set_line_cap(cairo.LINE_CAP_SQUARE)
145
145
 
146
146
        # Draw lines into the cell
188
188
        (column, colour) = self.node
189
189
        ctx.arc(cell_area.x + box_size * column + box_size / 2,
190
190
                cell_area.y + cell_area.height / 2,
191
 
                box_size / 5, 0, 2 * math.pi)
 
191
                box_size / 4, 0, 2 * math.pi)
192
192
 
193
193
        self.set_colour(ctx, colour, 0.0, 0.5)
194
194
        ctx.stroke_preserve()