On Wed, 17 Oct 2007 22:14:09 +0300
Martin Vermeer <[EMAIL PROTECTED]> wrote:

> On Wed, Oct 17, 2007 at 04:04:35PM +0200, Helge Hafting wrote:
> > Charstyles is nice for something - and now I even get
> > the URL charstyle automatically when opening older documents.
> > (Yes, I use 1.6 for work :-)
> > 
> > All very fine, but one problem. Whenever the cursor moves through an
> > URL charstyle, stuff on the screen jumps all over the place.
> > That is very distracting.
> > 
> > The line with the URL is shifted slightly down, possibly to make
> > room for the upper corners that mark the URL inset.
> > 
> > The lines below the URL downshifts a lot, probably to make
> > room for a label. But the URL charstyle don't have a label!
> > 
> > 
> > Suggestions for improvements:
> > 1. If there is no label (or a blank label or whatever),
> >    don't try to make any room. No need!
> > 
> > 2. Don't shift the line down. Use whatever local line height there is,
> >   and adapt the corners to that instead. Exceptions might be
> >   necessary for heavily nested styles, but it'd be _very_ nice if _no_
> >   text moves when entering a single charstyle. Ideally, no movement
> >   even within two levels. Many levels will probably be rare.
> >   This will make editing (or simply using LyX as a reader) much easier.
> > 
> >   If more visual feedback is needed, consider bigger corners,
> >   colors, or whatever. Even "marching ants" is a lot less disruptive
> >   than moving the line that I am reading.
> > 
> > 3. Possibly show the current style (and nested styles too?) on
> >    the status line, so stuffing labels into the text won't be necessary.
> >    A "charstyle combobox" in addition to the "paragraph style" box
> >    will also serve this purpose, and of course it offers easier use
> >   of charstyles too. Which is probably what we want. :-)
> > 
> > Helge Hafting
> 
> If Bo gets his info-on-mouseover working, the label can be permanently
> disabled if turned off. Then nothing will move. It's the label (always 
> drawn when inside the inset) that causes the movement. It's not true
> what you say that URL has no label; in fact it has an empty label. The
> worst of both worlds ;-/
> 
> (I could add specialcasing for that to InsetCollapsable; rather not.
> The patch for this is attached, in case somebody likes it. BTW why is
> URL in charstyles and not in custom insets? I spent some quality time
> looking for it :-( )
> 
> - Martin
> 

Actually the better way to do it is the attached. I'll commit this if
no objection is heard.

- Martin
Index: url.module
===================================================================
--- url.module	(revision 20941)
+++ url.module	(working copy)
@@ -3,12 +3,17 @@
 Format 4
 
 InsetLayout URL
-  LyXType charstyle
-  LatexType	command
+  LyXType custom
+  LatexType command
   LatexName url
+  Decoration minimalistic
+  LabelString URL
   Font
-  	Family Typewriter
+    Family Typewriter
   EndFont
+  LabelFont
+    Family Typewriter
+  EndFont
   Preamble
     \usepackage{url}
   EndPreamble

Reply via email to