Re: Text Resizing .. again



>>>>> "Meghal" == Meghal Harish Varia <varia ecf utoronto ca> writes:

    Meghal> Hi, I sent a message before asking how to "appropriately"
    Meghal> resize text when the window resizes (i.e. if the text is
    Meghal> supposed to fit into a certain x pixel by y pixel
    Meghal> rectangle, and this rectangle size changes when the window
    Meghal> size changes, how do i also increase/decrease the size of
    Meghal> the text as well).

Well you can hook into the resize events easily enough, and you can
query the allocations to find out how big your main window (Or any
subwindow type component) is. I think you can also specify fonts by
pixels -- The GTK font selector allows this, for instance. Given those
three things, I suspect what you want to do is possible. I haven't
done a whole lot of work with the GtkPixmap or any of the graphics
oriented components yet, though, so I don't personally know how to put
all that stuff together.

Correctly dealing with fonts is fairly tricky. Often, the user wants
to specify the fonts he wants to use along with a reasonable system
default. If you're expecing your application to get resized once and
then never again, it might be better just to let the user specify the
font or pull the font out of the GTK theme.

-- 
Bruce Ide                                            bruce ide echostar com
http://www.paratheoanametamystikhood.net





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