[LyX/master] Make all unbreakable spaces of the same Color_latex color

Jean-Marc Lasgouttes lasgouttes at lyx.org
Tue Jun 23 21:46:28 UTC 2020


Le 23/06/2020 à 23:11, Jean-Marc Lasgouttes a écrit :
> commit 49e1466f93b63b0489549d40ebbde944eff1c7f6
> Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
> Date:   Tue Jun 23 23:33:37 2020 +0200
> 
>      Make all unbreakable spaces of the same Color_latex color
>      
>      Of course, this means that negative spaces cannot be recognized anymore.

I did not mean to commit this yet, but it is a good occasion to discuss 
the issue of space color. I can revert that if needed.

I am not sure what was the logic of colors right now. So I decided that 
unbreakable is Color_latex and breakable is Color_special. Finally, 
VISIBLE (which is unbreakable) remains Color_foreground.

This means as notes that negative spaces are the same as positive ones. 
Should we use some special marking to indicate those negatives spacing 
(like /_\) ? Or a minus on top of the space, like
     -
|_______|

Another thing this is bugging me is that we have a Color_added_space, 
but it is only used for vertical spaces. Should we use this intead of 
Color_latex? Vertical spaces are not unbreakable AFAIK, so maybe they 
should use the same color as normal spaces.

Thoughts?

> ---
>   src/insets/InsetSpace.cpp |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp
> index 34ce9b5..3317044 100644
> --- a/src/insets/InsetSpace.cpp
> +++ b/src/insets/InsetSpace.cpp
> @@ -372,8 +372,11 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const
>   	Color col = Color_special;
>   	if (params_.kind == InsetSpaceParams::PROTECTED ||
>   	    params_.kind == InsetSpaceParams::ENSPACE ||
> +	    params_.kind == InsetSpaceParams::THIN ||
>   	    params_.kind == InsetSpaceParams::NEGTHIN ||
> +	    params_.kind == InsetSpaceParams::MEDIUM ||
>   	    params_.kind == InsetSpaceParams::NEGMEDIUM ||
> +	    params_.kind == InsetSpaceParams::THICK ||
>   	    params_.kind == InsetSpaceParams::NEGTHICK ||
>   	    params_.kind == InsetSpaceParams::CUSTOM_PROTECTED)
>   		col = Color_latex;
> 



More information about the lyx-devel mailing list