Re: [gtk-list] Re: Justification of the title

Sangeetha wrote,

>>  Is there anyway by which I can justify the title to the centre, instead
>>  of the default left justification?

Well one hack (very much a hack, a cheap on at that ) might be to connect
code to a resize window callback that finds the msg and titlebar widths and
and uses that info to add spaces infront of the msg.


number of spaces = ( ( Titlebar width / 2 ) - ( ( number of characters *
character width ) / 2 )  / character width )

loop number of spaces times
{ spaces = spaces + " " }

Message = Message + spaces

The down side of this is not all fonts have the same width characters and
most windows managers have icons and such in the titlebar that would need to
be accounted for in the equation.  I don't think that is possible, though.
Like I
said it's a cheap hack, but might work good enough for ya.  One more thing
think about it some windows managers use BeOS style tabs, instead of

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