Re: [LyX/master] When selecting special logos, set their color correctly

2016-10-26 Thread Jean-Marc Lasgouttes

Le 25/10/2016 à 17:09, Richard Heck a écrit :


Richard, this is candidate to branch.


OK.


Done now.

JMarc



Re: [LyX/master] When selecting special logos, set their color correctly

2016-10-25 Thread Richard Heck
On 10/25/2016 09:15 AM, Jean-Marc Lasgouttes wrote:
> Le 25/10/2016 à 15:14, Jean-Marc Lasgouttes a écrit :
>> commit 860accd01fb8115ec7c6ad80b054f1046e19c62f
>> Author: Jean-Marc Lasgouttes 
>> Date:   Tue Oct 25 15:13:23 2016 +0200
>>
>> When selecting special logos, set their color correctly
>>
>> It is not nice when they are the only thinkg in the text that
>> does not
>> change color.
>
> Richard, this is candidate to branch.

OK.

rh



Re: [LyX/master] When selecting special logos, set their color correctly

2016-10-25 Thread Jean-Marc Lasgouttes

Le 25/10/2016 à 15:14, Jean-Marc Lasgouttes a écrit :

commit 860accd01fb8115ec7c6ad80b054f1046e19c62f
Author: Jean-Marc Lasgouttes 
Date:   Tue Oct 25 15:13:23 2016 +0200

When selecting special logos, set their color correctly

It is not nice when they are the only thinkg in the text that does not
change color.


Richard, this is candidate to branch.

JMarc


---
 src/insets/InsetSpecialChar.cpp |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp
index 3d32f40..b6bcb47 100644
--- a/src/insets/InsetSpecialChar.cpp
+++ b/src/insets/InsetSpecialChar.cpp
@@ -139,8 +139,10 @@ namespace {
 // helper function: draw text and update x.
 void drawChar(PainterInfo & pi, int & x, int const y, char_type ch)
 {
-   pi.pain.text(x, y, ch, pi.base.font);
-   x += theFontMetrics(pi.base.font).width(ch);
+   FontInfo font = pi.base.font;
+   font.setPaintColor(pi.textColor(font.realColor()));
+   pi.pain.text(x, y, ch, font);
+   x += theFontMetrics(font).width(ch);
 }