Bug 121167 - Auto-resize for labels: improve usability
Summary: Auto-resize for labels: improve usability
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: HI wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-01 17:20 UTC by Nicolas Brisset
Modified: 2006-06-20 22:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch (18.76 KB, patch)
2006-06-20 20:30 UTC, Andrew Walker
Details
Proposed patch (17.43 KB, patch)
2006-06-20 22:12 UTC, Andrew Walker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2006-02-01 17:20:22 UTC
Version:           1.2.0_devel (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

Currently, newly created labels by default do not auto-resize for text. What's more, the "Margin" spinbox is not disabled when the auto-resize feature is disabled, whereas it doesn't make sense in that case.
I suggest the following improvements (please don't tell me they should be separate reports!):
1) move the "Margin" spinbox closer to the "Auto-resize for text" checkbox 
2) disable the "Margin" spinbox when it does not make sense
3) change the "Auto-resize for text" checkbox to radiobuttons "Fit box to text", "Fit text to box", "No fit"
4) (less important) remember the "fit" settings used when creating the last label

Barth, I think point 3) solves the concern you expressed in the discussion on the mailing list in an elegant way.
Comment 1 Netterfield 2006-06-17 02:22:58 UTC
Counter proposal:
-Get rid of the Auto Resize check box
-Make labels always Auto resized

If you want a label in a box which is not autoresized, put a borderless transparent label in a box.

Rational: a non-auto-resized label doesn't resize fonts on resize, which completely breaks What You See Is Sort Of What You Get (WYSISOWYG).  This is what we did with legends already.
Comment 2 George Staikos 2006-06-18 18:08:44 UTC
 That sounds good to me.  Less hacky code to keep running.
Comment 3 Nicolas Brisset 2006-06-19 14:50:10 UTC
OK, sounds acceptable and simpler.
Comment 4 Andrew Walker 2006-06-20 20:30:51 UTC
Created attachment 16723 [details]
Proposed patch

As per Barth's suggestion
Comment 5 George Staikos 2006-06-20 20:57:39 UTC
  You cannot remove public API from KstScript anymore.  It will break existing 
scripts.  They'll throw an exception and halt.  I think this needs to be 
rethought in terms of implementation at least.
Comment 6 Andrew Walker 2006-06-20 21:59:23 UTC
So we put the stuff back into scripting but the function does nothing.
Comment 7 Andrew Walker 2006-06-20 22:12:03 UTC
Created attachment 16727 [details]
Proposed patch
Comment 8 George Staikos 2006-06-20 22:19:30 UTC
please don't remove the commented code about tab/cr expansion breaking latex support.  I don't want that regression to creep in.  Also the JavaScript docs need to be updated (in the .h file) to mark the function as obsolete.  The rest looks fine now.  I guess there's not much we can do.
Comment 9 Andrew Walker 2006-06-20 22:57:50 UTC
SVN commit 553369 by arwalker:

BUG:121167 Remove auto-resize option from view label as it breaks desired WYSIWYG behaviour.

 M  +3 -17     extensions/js/bind_label.cpp  
 M  +1 -4      extensions/js/bind_label.h  
 M  +0 -1      libkstapp/kst2dplot.cpp  
 M  +0 -1      libkstapp/kstfitdialog_i.cpp  
 M  +0 -1      libkstapp/kstgfxtextmousehandler.cpp  
 M  +28 -65    libkstapp/kstviewlabel.cpp  
 M  +0 -5      libkstapp/kstviewlabel.h  
 M  +36 -42    libkstapp/viewlabelwidget.ui