;-)

I think that this patch clears both bugs.
Angus



On Tuesday 23 January 2001 11:42, Jean-Marc Lasgouttes wrote:
> >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> Angus> Hmmm! Moreover, once you've saved your selection, all non-GUI
> Angus> colours come up as black which isn't very useful. You have to
> Angus> restart LyX to get the colours back and then this ignores the
> Angus> changes you've made.
> 
> Angus> Fortunately, only colours are affected by this.
> 
> Angus> Wierd. I'll investigate. Thanks for the report. Angus
> 
> Pit sutterlin had a similar report that is bug
>   https://sourceforge.net/bugs/?func=detailbug&bug_id=129258&group_id=15212
> (assigned to you BTW :).
> 
> JMarc
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.6
diff -u -r1.6 ChangeLog
--- src/frontends/xforms/ChangeLog	2001/01/21 21:41:35	1.6
+++ src/frontends/xforms/ChangeLog	2001/01/23 12:22:38
@@ -1,3 +1,8 @@
+2001-01-23  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* FormPreferences.C (LoadBrowserLyX): convert unsigned short to
+	unsigned char correctly and so fix 2 bugs loading/changing colors.
+
 2001-01-21  Dekel Tsur  <[EMAIL PROTECTED]>
 
 	* FormRef.C (update): Do not update dialog_->{ref,name,type}
Index: src/frontends/xforms/FormPreferences.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormPreferences.C,v
retrieving revision 1.50
diff -u -r1.50 FormPreferences.C
--- src/frontends/xforms/FormPreferences.C	2001/01/03 17:43:28	1.50
+++ src/frontends/xforms/FormPreferences.C	2001/01/23 12:22:39
@@ -806,9 +806,9 @@
 		// Note that X stores the RGB values in the range 0 - 65535
 		// whilst we require them in the range 0 - 255.
 		RGBColor col;
-		col.r = static_cast<unsigned char>(xcol.red);
-		col.g = static_cast<unsigned char>(xcol.green);
-		col.b = static_cast<unsigned char>(xcol.blue);
+		col.r = xcol.red / 256;
+		col.g = xcol.green / 256;
+		col.b = xcol.blue / 256;
 
 		// Create a valid X11 name of the form "#rrggbb" and change the
 		// LColor X11name to this. Don't want to trigger a redraw,

Reply via email to