[Kst] PATCH: inconsistent font sizes
netterfield at astro.utoronto.ca
Sat Feb 4 06:34:14 CET 2006
Actually, this is not related to the stale info bug.
The issue here is that the axis labels have to use 'geometry' to determine the
font size: they can't use the content rect because the content rect depends
on the axis label size... its recursive, with no promise of convergence
(given integer font sizes). But this is fine. The axis labels do, and
always have used geometry. No problem.
The problem was that the other labels had chosen to use contentsRect for the
size. Also no problem in and of itself. The only (minor) problem is that
that font size 0 for a child label will be smaller than font size 0 for an
axis label. Not perfect.
So the patch just says "if geometry is good enough for the axis labels size,
its good enough for child label size."
This has nothing to do with where we place the labels though.
On February 3, 2006 06:26 pm, George Staikos wrote:
> On Friday 03 February 2006 21:04, George Staikos wrote:
> > On Friday 03 February 2006 16:38, Barth Netterfield wrote:
> > > 2dplot uses the plot geometry to calculate plot sizes, but viewlabels
> > > were using the contentsRext, leading to inconsistent font sizes.
> > >
> > > This fixes that by having both use the geometry. They both have to
> > > use the same thing, and 2dplots can't use contents rect because plots
> > > don't know their contents rect until they know the font size...
> > Ouch, tough problem. This means that labels will drift around
> > contents though... Is that what you want? I don't care either way,
> > really, but this patch is fine if that is what you want.
> One more note, the drift issue (the stale child location) is directly
> related to this. Kst2DPlot needs its draw/paint/update split up properly.
> Right now it's all tangled together. Once it's split, I think it will
> work. That's the whole point of updateSelf() vs paintSelf().
More information about the Kst