Re: Gtk2::CellRendererText font issue



On Fri, 2 May 2003, muppet wrote:


Ross McFarland said:

this is a gtk thing, i.e. not specific to gtk2-perl.

yeah... i tried it out in nautilus (the most accessible editable cells i could
think of) and the font size was different in edit mode than in the normal
view.  that's not a very scientific test, i know, but still, the point is that
the editable created when editing a cell is not the same actual window as the
treeview on which it sits.

an editable ought to get its font from the style, which is inherited through
some strange mechanism i don't fully understand.

try something like (pseudocode, actually, not tested)

  $font_desc = Gtk2::Pango::FontDescription->new_from_string ("Monospace 20");
  $treeview->modify_font ($font_desc);

in addition to

$renderer->set("font", "Monospace 20");

and see if that fixes the font size on the editable.

by the way, is it just the size that changes, or does the face change, as
well?  i'm presuming that the face changes.

--
muppet <scott at asofyet dot org>

The face appears to change as well.  It is hard to tell since the font is so small (hence my desire to change 
it).




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