Bug 120883 - Text size is changed contrary to user's expectations
Summary: Text size is changed contrary to user's expectations
Status: RESOLVED INTENTIONAL
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-27 19:49 UTC by Andrew Walker
Modified: 2006-02-15 02:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2006-01-27 19:49:19 UTC
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
Comment 1 Andrew Walker 2006-01-27 23:20:11 UTC
This will have to wait until the new painting scheme has been introduced as the problem is in KstViewLabel::paint(...)
Comment 2 George Staikos 2006-01-27 23:24:21 UTC
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.
Comment 3 Netterfield 2006-01-27 23:28:19 UTC
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. 
 
Comment 4 Andrew Walker 2006-01-28 00:26:51 UTC
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).
Comment 5 Netterfield 2006-01-28 01:14:05 UTC
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.
Comment 6 Netterfield 2006-02-15 02:12:05 UTC
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.