Version: HEAD (using KDE KDE 3.5.0) OS: Linux PROBLEM: When a text label is dragged and dropped into some other view object the text size may be changed, contrary to what the user might expect STEPS TO REPRODUCE: Start Kst Create an ellipse object taking about one quarter of the window extent Create a text object which is smaller in both dimensions than the ellipse Check both the Transparent and "Auto Resize for Text" in the Edit Label dialog Drag and drop the text object into the ellipse object (implicitly parenting it to the ellipse object) RESULTS: The text object size decreases significantly EXPECTED RESULTS: The text object size should remain unchanged
This will have to wait until the new painting scheme has been introduced as the problem is in KstViewLabel::paint(...)
On Friday 27 January 2006 17:20, Andrew Walker wrote: > ------- This will have to wait until the new painting scheme has been > introduced as the problem is in KstViewLabel::paint(...) Don't worry, I can merge fixes. KstViewLabel is slaughtered in my branch though. I finally traced down a problem in 2dplot which means my branch should be working with view and printing after my next commit, minus support for resizing labels and legends.
The current behavior is intentional, if surprising. The problem is with the definition of 'text size', which was inherited from the definition for axis labels: size 0 is supposed to mean 12 point for some default size plot (don't remember exactly what size...). If you then make the plot bigger, the label should grow. If you shrink the plot, the labels should get smaller (down to a floor size). Now, what about a label that is the child of a plot, other than axis labels? It would be surprising indeed if their size had a different definition. So, in calculating the size the font should be, we use the dimensions of the parent. If a label of text size '0' is the child of a big plot, the displayed font should be larger than if it is the parent of a small plot. (ie, parented floating labels have the same behavior as axis labels). Of course the label could be owned by things other than a plot, like an ellipse in the bug report. So..... the current behavior, at least, is usable, once understood.
Regrettably what you're describing is not the default behaviour. By default auto-resize is false and so the text label font is the same absolute size regardless of the plot size (i.e. not like an axis label).
The intended behavior is: It defaults to auto-resize = false if you create the label by dragging a box. It defaults to auto-resize = true if you create the label by clicking.
Current behavior is intended. But, as discussed in this bug repoprt, but not related to this bug, we may want to reconsider the behavior of 'don't resize for text' mode.