Re: CellRendererSpinButton

On Friday 09 July 2004 15:25, muppet wrote:

in my testcase (adding a 72x72 pixbuf column to the cell text is top-aligned, and i don't
see a way to change that.  

Here comes the trick:
   my $requisition = $spin_button->size_request;
  $cell_area -> y( $cell_area -> y() + $cell_area -> height / 2 - 10);
    # where '- 10' is dependent to the font size ;)
  $cell_area->height ($requisition->height);

how did you get the centered stuff?  i

The standard renderers are centered by default.
I guess i found it in any example:
                $widget->get_style->paint_box ($window, $widget->state,
                                         'out', $cell_area,
                                         undef, "optionmenu",
                                        # TODO: figure out font size / 2 and replace -15 
                                         $cell_area->y + $cell_area->height / 2 -15,
                                        # TODO: figure out font size and replace 30

if you like the key handling i posted last night, i'll commit all of
this stuff this evening when i get home.

I'll test everything tonight.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]