Re: GnomeCanvasText properties (was: Re: The future of GdkFont declarations)



ERDI Gergo <cactus cactus rulez org> writes: 
> Should the attribute list you get from the `attributes' property contain
> the atomically-added attributes? (i.e. if you set the attribute list via
> passing a markup string, and also turn underlining on, should the
> `attribute' property contain the underline attribute?)

I would think no, the attribute list would be merged with the other
stuff when creating the layout.

"markup" is a shortcut for setting this attribute list.

Then to create the layout you copy the attr list, add "underline"
etc., then set it on the layout.

Maybe? I'm not sure.

"underline" is really a bit weird, the reason CellRendererText has it
is simply that you may want to tie it to a boolean column in the model
(i.e. there's value in just making this a boolean toggle for a cell
renderer). Maybe there's no real reason to do that for CanvasText.

> Strike-through is not rendered properly (either from a marked up text or
> by explicitly turning it on) -- is it a Pango limitation or am I doing
> something wrong here?

Bug in something. ;-) It seems to render properly in the text widget
demo in gtk-demo; does that work on your machine?

That doesn't mean Pango always gets it right though. Actually the text
widget isn't using gdk_draw_layout(), so maybe gdk_draw_layout()
doesn't handle strikethrough. Try strikethrough in a GtkLabel and see
if that works.

Havoc




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